Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1859 in orxonox.OLD for orxonox/trunk/core/orxonox.cc


Ignore:
Timestamp:
May 5, 2004, 8:29:17 PM (20 years ago)
Author:
patrick
Message:

/orxonox/trunk/core: key action support added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/orxonox.cc

    r1858 r1859  
    7373  glutReshapeFunc(reshape);
    7474  glutKeyboardFunc(keyboard);
     75  glutSpecialFunc(specFunc);
    7576}
    7677
     
    9495  switch(key) {
    9596  case 27:
    96     exit 0;
     97    exit(0);
     98    break;
     99  }
     100}
     101
     102
     103void Orxonox::specFunc(int key, int x, int y)
     104{
     105  switch(key) {
     106  case GLUT_KEY_UP:
     107    cout << "key_up" << endl;
     108    break;
     109  case GLUT_KEY_DOWN:
     110    cout << "key_down" << endl;
     111    break;
     112  case GLUT_KEY_RIGHT:
     113    cout << "key_right" << endl;
     114    break;
     115  case GLUT_KEY_LEFT:
     116    cout << "key_left" << endl;
    97117    break;
    98118  }
Note: See TracChangeset for help on using the changeset viewer.