Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7868 in orxonox.OLD for trunk/src/story_entities/simple_game_menu.cc


Ignore:
Timestamp:
May 26, 2006, 1:21:32 PM (18 years ago)
Author:
bensch
Message:

trunk: merge Check in the Event-changes:
r7867 | bensch | 2006-05-26 13:19:46 +0200 (Fri, 26 May 2006) | 1 line

Events better subscribed


r7866 | bensch | 2006-05-26 13:11:10 +0200 (Fri, 26 May 2006) | 1 line

Events are subscribed at the EventListener, and not the EventHandler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/simple_game_menu.cc

    r7765 r7868  
    1818
    1919#include "simple_game_menu.h"
     20
     21#include "event_handler.h"
    2022
    2123#include "state.h"
     
    3234#include "camera.h"
    3335
    34 #include "event_handler.h"
    3536#include "graphics_engine.h"
    3637#include "object_manager.h"
     
    112113  GameWorld::init();
    113114
    114   EventHandler::getInstance()->subscribe(this, ES_MENU, SDLK_UP);
    115   EventHandler::getInstance()->subscribe(this, ES_MENU, SDLK_DOWN);
    116   EventHandler::getInstance()->subscribe(this, ES_MENU, SDLK_RETURN);
    117   EventHandler::getInstance()->subscribe(this, ES_MENU, SDLK_SPACE);
    118   EventHandler::getInstance()->subscribe(this, ES_MENU, SDLK_ESCAPE);
     115  this->subscribeEvent(ES_MENU, SDLK_UP);
     116  this->subscribeEvent(ES_MENU, SDLK_DOWN);
     117  this->subscribeEvent(ES_MENU, SDLK_RETURN);
     118  this->subscribeEvent(ES_MENU, SDLK_SPACE);
     119  this->subscribeEvent(ES_MENU, SDLK_ESCAPE);
    119120
    120121  this->dataTank->localCamera->setRelCoor(this->cameraVector);
     
    253254ErrorMessage SimpleGameMenu::unloadData()
    254255{
    255   EventHandler::getInstance()->unsubscribe(this, ES_MENU);
     256  this->unsubscribeEvents(ES_MENU);
    256257
    257258  std::vector<MenuLayer>::iterator mit;
Note: See TracChangeset for help on using the changeset viewer.