Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/gui/orxonox_gui_keys.h @ 2733

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
Line 
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"
10#include <gdk/gdkkeysyms.h>
11
12/**
13 * defines the Possible Player Keys
14 */
15enum KEYS { UP, DOWN, LEFT, RIGTH, SHOOT };
16
17/**
18   \brief Class to hold infos about a Player
19*/
20class Player
21{
22 private:
23  char keys[10];
24  Button* openButton;
25  Window* window;
26 
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.
37class 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
54gint key_cb(GtkWidget* w, GdkEventKey* event, gpointer data);
55
56#endif /* _ORXONOX_GUI_KEYS_H */
Note: See TracBrowser for help on using the repository browser.