- Timestamp:
- Jun 1, 2005, 11:29:44 PM (19 years ago)
- Location:
- orxonox/trunk/src/util/event
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/event/event.h
r4404 r4454 22 22 23 23 24 int offset; //!< offset in the event type array 25 char cmd[CMD_LENGHT]; //!< the command delivered 26 int type; //!< the type field 27 bool bPressed; //!< is true, if the button/mouse was pressed, false if released 24 int offset; //!< offset in the event type array 25 int type; //!< the type field 26 bool bPressed; //!< is true, if the button/mouse was pressed, false if released 28 27 29 Uint16 x, y; //!< x and y coordinates 30 Sint16 xRel, yRel; //!< relative x and y movement to last point 28 Uint16 x; //!< x coordinate 29 Uint16 y; //!< y coordinate 30 Sint16 xRel; //!< relative x movement to last point 31 Sint16 yRel; //!< relative y movement to last point 31 32 }; 32 33 -
orxonox/trunk/src/util/event/event_def.h
r4450 r4454 11 11 #include "stdincl.h" 12 12 13 14 #define CMD_LENGHT 1615 #define N_STD_KEYS SDLK_LAST16 #define N_BUTTONS 617 #define DEFAULT_KEYBIND_FILE "~/.orxonox/orxonox.conf"18 19 20 #define EVENT_QUEUE_LENGTH 3221 13 22 14 //! these are the extended event types, that are not included in SDL_keysym … … 39 31 }; 40 32 33 41 34 //! this is an enumeration of all states of the event_handler/game 42 35 typedef enum elState -
orxonox/trunk/src/util/event/event_handler.cc
r4450 r4454 93 93 /** 94 94 \brief set the state of the event handler 95 \param state to which the event handler shall change95 \param state: to which the event handler shall change 96 96 */ 97 97 void EventHandler::setState(elState state) … … 103 103 /** 104 104 \brief subscribe to an event 105 \param the event listener that wants to subscribe itself, the listener that will be called when the evetn occures106 \param state for which the listener wants to receive events107 \param the event type that wants to be listened for.105 \param el: the event listener that wants to subscribe itself, the listener that will be called when the evetn occures 106 \param state: for which the listener wants to receive events 107 \param eventType: the event type that wants to be listened for. 108 108 109 109 This is one of the most important function of the EventHandler. If you would like to subscribe for more … … 134 134 /** 135 135 \brief unsubscribe from the EventHandler 136 \param the stat in which it has been subscribed137 \param the event, that shall be unsubscribed136 \param state: the stat in which it has been subscribed 137 \param eventType: the event, that shall be unsubscribed 138 138 139 139 if you want to unsubscribe an event listener from all subscribed events, just use the … … 149 149 /** 150 150 \brief unsubscribe all events from a specific listener 151 \param the listener that wants to unsubscribe itself152 \param the state in which the events shall be unsubscribed151 \param el: the listener that wants to unsubscribe itself 152 \param state: the state in which the events shall be unsubscribed 153 153 154 154 */ … … 179 179 /** 180 180 \brief flush all registered events 181 \param ina specific state181 \param state: a specific state 182 182 */ 183 183 void EventHandler::flush(elState state) -
orxonox/trunk/src/util/event/event_listener.h
r4452 r4454 20 20 virtual ~EventListener(); 21 21 22 /** 23 \brief abstract function that processes events from the handler 24 \param event: the event 25 */ 22 26 virtual void process(const Event &event) = NULL; 23 27 }; -
orxonox/trunk/src/util/event/key_mapper.cc
r4452 r4454 103 103 104 104 105 106 105 /** 107 106 \brief loads new key bindings from a file -
orxonox/trunk/src/util/event/key_mapper.h
r4452 r4454 28 28 virtual ~KeyMapper(); 29 29 30 void loadKeyBindings(const char* fileName = "~/.orxonox/orxonox.conf");30 void loadKeyBindings(const char* fileName = DEFAULT_CONFIG_FILE); 31 31 32 32 void debug(); … … 64 64 65 65 private: 66 Sint32 coord[2];//!< temp place to save variables in nameToIndex() function66 Sint32 coord[2]; //!< temp place to save variables in nameToIndex() function 67 67 }; 68 68
Note: See TracChangeset
for help on using the changeset viewer.