Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1859 in orxonox.OLD for orxonox


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

/orxonox/trunk/core: key action support added

Location:
orxonox/trunk/core
Files:
2 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  }
  • orxonox/trunk/core/orxonox.h

    r1858 r1859  
    2424  static void reshape (int w, int h);
    2525  static void keyboard(unsigned char key, int x, int y);
     26  static void specFunc(int key, int x, int y);
    2627};
    2728
Note: See TracChangeset for help on using the changeset viewer.