Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4086 in orxonox.OLD for orxonox/trunk/src/lib/gui/gui/gui_keys.h


Ignore:
Timestamp:
May 6, 2005, 4:51:48 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: keySelector is now extern from Player

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/gui/gui/gui_keys.h

    r4056 r4086  
    2020enum KEYS {UP, DOWN, LEFT, RIGHT, SHOOT};
    2121
     22//! One KeyOption has one InputKey
     23struct 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
    2231class Player;
    2332//! Class that creates the Keys-Options.
     
    3443  GuiKeys(void);
    3544  ~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
    3650};
    3751
     
    4862  Button* closeButton;    //!< The CloseButton for this key-settings.
    4963  Box* pKeysBox;          //!< The Box that holds the Key-settings.
    50  
    51   //! One KeyOption has one InputKey
    52   struct InputKey
    53   {
    54     Box* pKeyBox;           //!< One Box that holds the Keys
    55     Button* pKeyButton;     //!< The Button for changing the Key.
    56     OptionLabel* pKeyOLabel;//!< The Label for displaying the Key-setting.
    57   };
    5864
    59   InputKey* inputKey[10];     //!< Buttons-array. \todo make it dynamic.
     65  //  InputKey* inputKey[10];     //!< Buttons-array. \todo make it dynamic.
    6066
    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.
    6467 public:
    6568  Player(char* player);
    6669
    67   Widget* addKey(KEYS key, char* name);
    6870
    6971  Button* getOpenButton(void);
    7072
    71 #ifdef HAVE_GTK2
    72   static gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
    73   static gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
    74 #endif /* HAVE_GTK2 */
    7573  void setkey(KEYS key);
    7674 
    7775};
    7876
     77Widget* addKey(KEYS key, char* name);
     78#ifdef HAVE_GTK2
     79gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
     80gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
     81#endif /* HAVE_GTK2 */
    7982
    8083
Note: See TracChangeset for help on using the changeset viewer.