/*! \file orxonox_gui_keys.h \brief File that holds the class that creates the Keyboard-Options. */ #ifndef _ORXONOX_GUI_KEYS_H #define _ORXONOX_GUI_KEYS_H #include "orxonox_gui.h" #include /** * defines the Possible Player Keys */ enum KEYS { UP, DOWN, LEFT, RIGHT, SHOOT }; //! Class to hold infos about a Player class Player { private: Window* keyWindow; bool windowIsOpen; Button* openButton; Box* keysBox; Box* keyBox[10]; Button* keyButton[10]; Label* keyLabel[10]; public: Player(char* player); Widget* addKey (KEYS key, char* name); Button* getOpenButton(); void openWindow (); static gint openWindowEvent(GtkWidget* widget, GdkEvent* event, void* player); static gint key_cb(GtkWidget* w, GdkEventKey* event, void* widget); void setkey(KEYS key); }; //! Class that creates the Keys-Options. class OrxonoxGuiKeys { private: Frame* keysFrame; Box* keysBox; Player* player1; Player* player2; Button* misc; public: OrxonoxGuiKeys (); ~OrxonoxGuiKeys (); Widget* getWidget (); }; #endif /* _ORXONOX_GUI_KEYS_H */