Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4408 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 31, 2005, 12:11:57 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: integrating the event handler into orxonox mainclass

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/command_node.cc

    r4386 r4408  
    285285        default:
    286286          Orxonox *orx = Orxonox::getInstance();
    287           orx->eventHandler(&event);
     287          orx->graphicsHandler(&event);
    288288          break;
    289289        }
  • orxonox/trunk/src/orxonox.cc

    r4398 r4408  
    4040#include "benchmark.h"
    4141#include "event_handler.h"
     42#include "event.h"
    4243
    4344#include <string.h>
     
    166167  localinput = new CommandNode(configfilename);
    167168
    168   EventHandler::getInstance()->test();
     169  this->eventHandler = EventHandler::getInstance();
     170  this->eventHandler->init();
    169171 
    170172  return 0;
     
    286288   \param event: an event not handled by the CommandNode
    287289*/
    288 void Orxonox::eventHandler(SDL_Event* event)
     290void Orxonox::graphicsHandler(SDL_Event* event)
    289291{
    290292  // Handle special events such as reshape, quit, focus changes
     
    316318  return false;
    317319}
     320
     321
     322void Orxonox::process(const Event &event)
     323{}
    318324
    319325/**
  • orxonox/trunk/src/orxonox.h

    r4286 r4408  
    99#include "comincl.h"
    1010#include "glincl.h"
     11#include "event_listener.h"
     12
    1113
    1214class CommandNode;
     
    1719class ResourceManager;
    1820class ObjectManager;
     21class EventHandler;
     22class Event;
    1923
    2024//! Orxonox core singleton class
    2125/**
    2226*/
    23 class Orxonox {
     27class Orxonox : public EventListener {
    2428
    2529 private:
     
    3438  ResourceManager* resourceManager; //!< The ResourceManager
    3539  ObjectManager* objectManager; //!< the object manager of the game
     40  EventHandler* eventHandler;
    3641 
    3742  bool bQuitOrxonox;          //!< If Orxonox should Quit
     
    5964  void quitGame();
    6065
    61   void eventHandler (SDL_Event* event);
     66  void graphicsHandler (SDL_Event* event);
    6267  bool systemCommand (Command* cmd);
     68  void process(const Event  &event);
    6369
    6470  int init (int argc, char** argv);
Note: See TracChangeset for help on using the changeset viewer.