Changeset 4365 in orxonox.OLD for orxonox/trunk
- Timestamp:
- May 28, 2005, 3:24:48 PM (19 years ago)
- Location:
- orxonox/trunk/src/util/event
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/event/event_def.h
r4364 r4365 15 15 #define DEFAULT_KEYBIND_FILE "~/.orxonox/orxonox.conf" 16 16 17 #define EVENT_QUEUE_LENGTH 32 17 18 18 19 typedef enum extEventTyes … … 23 24 EV_JOY_BALL_MOTION, 24 25 EV_JOY_HAT_MOTION, 25 EV_JOY_BUTTON 26 EV_JOY_BUTTON, 27 28 EV_NUMBER 26 29 }; 27 30 -
orxonox/trunk/src/util/event/event_handler.cc
r4364 r4365 38 38 this->listeners = new EventListener**[ES_NUMBER]; 39 39 for(int i = 0; i < ES_NUMBER; ++i) 40 this->listeners[i] = new EventListener*[ SDLK_LAST];40 this->listeners[i] = new EventListener*[EV_NUMBER]; 41 41 42 42 /* now initialize them all to zero */ … … 282 282 PRINT(0)("\n==========================| EventHandler::Process () |===\n"); 283 283 PRINT(0)("= Got Event nr%i\n, for state %i", event.type, this->state); 284 PRINT(0)("=======================================================\n");285 284 286 285 listener = this->listeners[this->state][event.key.keysym.sym]; 287 //if( listener != NULL) 288 //listener->process(); 289 290 } 291 } 286 if( listener != NULL) 287 { 288 listener->process(ev); 289 PRINTF(0)("= Event dispatcher msg: This event has been consumed\n"); 290 } 291 else 292 { 293 PRINTF(0)("= Event dispatcher msg: This event has NOT been consumed\n"); 294 } 295 296 PRINT(0)("=======================================================\n"); 297 } 298 } -
orxonox/trunk/src/util/event/event_listener.h
r4352 r4365 9 9 10 10 #include "base_object.h" 11 #include "event.h" 11 12 #include "event_def.h" 12 13 … … 19 20 virtual ~EventListener(); 20 21 22 virtual void process(const Event &event) = NULL; 23 24 private: 25 21 26 22 27 };
Note: See TracChangeset
for help on using the changeset viewer.