- Timestamp:
- May 31, 2005, 12:11:57 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/command_node.cc
r4386 r4408 285 285 default: 286 286 Orxonox *orx = Orxonox::getInstance(); 287 orx-> eventHandler(&event);287 orx->graphicsHandler(&event); 288 288 break; 289 289 } -
orxonox/trunk/src/orxonox.cc
r4398 r4408 40 40 #include "benchmark.h" 41 41 #include "event_handler.h" 42 #include "event.h" 42 43 43 44 #include <string.h> … … 166 167 localinput = new CommandNode(configfilename); 167 168 168 EventHandler::getInstance()->test(); 169 this->eventHandler = EventHandler::getInstance(); 170 this->eventHandler->init(); 169 171 170 172 return 0; … … 286 288 \param event: an event not handled by the CommandNode 287 289 */ 288 void Orxonox:: eventHandler(SDL_Event* event)290 void Orxonox::graphicsHandler(SDL_Event* event) 289 291 { 290 292 // Handle special events such as reshape, quit, focus changes … … 316 318 return false; 317 319 } 320 321 322 void Orxonox::process(const Event &event) 323 {} 318 324 319 325 /** -
orxonox/trunk/src/orxonox.h
r4286 r4408 9 9 #include "comincl.h" 10 10 #include "glincl.h" 11 #include "event_listener.h" 12 11 13 12 14 class CommandNode; … … 17 19 class ResourceManager; 18 20 class ObjectManager; 21 class EventHandler; 22 class Event; 19 23 20 24 //! Orxonox core singleton class 21 25 /** 22 26 */ 23 class Orxonox {27 class Orxonox : public EventListener { 24 28 25 29 private: … … 34 38 ResourceManager* resourceManager; //!< The ResourceManager 35 39 ObjectManager* objectManager; //!< the object manager of the game 40 EventHandler* eventHandler; 36 41 37 42 bool bQuitOrxonox; //!< If Orxonox should Quit … … 59 64 void quitGame(); 60 65 61 void eventHandler (SDL_Event* event);66 void graphicsHandler (SDL_Event* event); 62 67 bool systemCommand (Command* cmd); 68 void process(const Event &event); 63 69 64 70 int init (int argc, char** argv);
Note: See TracChangeset
for help on using the changeset viewer.