Changeset 4086 in orxonox.OLD for orxonox/trunk/src/lib/gui/gui/gui_keys.h
- Timestamp:
- May 6, 2005, 4:51:48 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/gui_keys.h
r4056 r4086 20 20 enum KEYS {UP, DOWN, LEFT, RIGHT, SHOOT}; 21 21 22 //! One KeyOption has one InputKey 23 struct InputKey 24 { 25 Box* pKeyBox; //!< One Box that holds the Keys 26 Button* pKeyButton; //!< The Button for changing the Key. 27 OptionLabel* pKeyOLabel;//!< The Label for displaying the Key-setting. 28 }; 29 30 22 31 class Player; 23 32 //! Class that creates the Keys-Options. … … 34 43 GuiKeys(void); 35 44 ~GuiKeys(void); 45 46 static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed. 47 static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed. 48 static long keySignal; //!< A keySignal that handles keyboard clicks. Static, because only one needed. 49 36 50 }; 37 51 … … 48 62 Button* closeButton; //!< The CloseButton for this key-settings. 49 63 Box* pKeysBox; //!< The Box that holds the Key-settings. 50 51 //! One KeyOption has one InputKey52 struct InputKey53 {54 Box* pKeyBox; //!< One Box that holds the Keys55 Button* pKeyButton; //!< The Button for changing the Key.56 OptionLabel* pKeyOLabel;//!< The Label for displaying the Key-setting.57 };58 64 59 InputKey* inputKey[10]; //!< Buttons-array. \todo make it dynamic.65 // InputKey* inputKey[10]; //!< Buttons-array. \todo make it dynamic. 60 66 61 static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed.62 static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed.63 static long keySignal; //!< A keySignal that handles keyboard clicks. Static, because only one needed.64 67 public: 65 68 Player(char* player); 66 69 67 Widget* addKey(KEYS key, char* name);68 70 69 71 Button* getOpenButton(void); 70 72 71 #ifdef HAVE_GTK272 static gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);73 static gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);74 #endif /* HAVE_GTK2 */75 73 void setkey(KEYS key); 76 74 77 75 }; 78 76 77 Widget* addKey(KEYS key, char* name); 78 #ifdef HAVE_GTK2 79 gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget); 80 gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey); 81 #endif /* HAVE_GTK2 */ 79 82 80 83
Note: See TracChangeset
for help on using the changeset viewer.