Last change
on this file since 2733 was
2733,
checked in by bensch, 20 years ago
|
orxonox/trunk/gui: added keystrokes, and for testing added them to button Player
|
File size:
881 bytes
|
Rev | Line | |
---|
[2613] | 1 | /*! |
---|
| 2 | \file orxonox_gui_keys.h |
---|
| 3 | \brief File that holds the class that creates the Keyboard-Options. |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _ORXONOX_GUI_KEYS_H |
---|
| 7 | #define _ORXONOX_GUI_KEYS_H |
---|
| 8 | |
---|
| 9 | #include "orxonox_gui.h" |
---|
[2733] | 10 | #include <gdk/gdkkeysyms.h> |
---|
[2613] | 11 | |
---|
| 12 | /** |
---|
| 13 | * defines the Possible Player Keys |
---|
| 14 | */ |
---|
| 15 | enum KEYS { UP, DOWN, LEFT, RIGTH, SHOOT }; |
---|
| 16 | |
---|
| 17 | /** |
---|
| 18 | \brief Class to hold infos about a Player |
---|
| 19 | */ |
---|
| 20 | class Player |
---|
| 21 | { |
---|
| 22 | private: |
---|
| 23 | char keys[10]; |
---|
| 24 | Button* openButton; |
---|
| 25 | Window* window; |
---|
[2625] | 26 | |
---|
[2613] | 27 | public: |
---|
| 28 | Player(char* player); |
---|
| 29 | |
---|
| 30 | Button* getOpenButton(); |
---|
| 31 | |
---|
| 32 | void setkey(KEYS key); |
---|
| 33 | |
---|
| 34 | }; |
---|
| 35 | |
---|
| 36 | //! Class that creates the Keys-Options. |
---|
| 37 | class OrxonoxGuiKeys |
---|
| 38 | { |
---|
| 39 | private: |
---|
| 40 | Frame* keysFrame; |
---|
| 41 | Box* keysBox; |
---|
| 42 | Player* player1; |
---|
| 43 | Player* player2; |
---|
| 44 | Button* misc; |
---|
| 45 | |
---|
| 46 | public: |
---|
| 47 | OrxonoxGuiKeys (); |
---|
| 48 | ~OrxonoxGuiKeys (); |
---|
| 49 | |
---|
| 50 | Widget* getWidget (); |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | |
---|
[2733] | 54 | gint key_cb(GtkWidget* w, GdkEventKey* event, gpointer data); |
---|
[2613] | 55 | |
---|
| 56 | #endif /* _ORXONOX_GUI_KEYS_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.