Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4411 in orxonox.OLD


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

orxonox/trunk: now system events work again: quit, pause, next-level

Location:
orxonox/trunk/src/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/key_mapper.cc

    r4410 r4411  
    206206    {
    207207      if( !strcmp (name, map[i].pName)) { *map[i].pValue = keyID; break;}
     208      PRINTF(0)("Mapping %s to id %i\n", name, keyID);
    208209    }
    209210}
  • orxonox/trunk/src/util/loading/game_loader.cc

    r4410 r4411  
    6565  if(this->currentCampaign != NULL)
    6666    this->currentCampaign->init();
     67
     68  this->eventHandler = EventHandler::getInstance();
     69  this->eventHandler->subscribe(this, ES_ALL, KeyMapper::PEV_PAUSE);
     70  this->eventHandler->subscribe(this, ES_ALL, KeyMapper::PEV_QUIT);
     71  this->eventHandler->subscribe(this, ES_ALL, KeyMapper::PEV_NEXT_WORLD);
     72  this->eventHandler->subscribe(this, ES_ALL, KeyMapper::PEV_PREVIOUS_WORLD);
    6773}
    6874
     
    258264
    259265
     266
     267
    260268void GameLoader::process(const Event& event)
    261269{
  • orxonox/trunk/src/util/loading/game_loader.h

    r4410 r4411  
    2424class BaseObject;
    2525class Event;
     26class EventHandler;
    2627
    2728//! The GameLoader
     
    7273 
    7374  Campaign* fileToCampaign(const char* name);
     75  EventHandler* eventHandler;
    7476
    7577  Factory* first;
Note: See TracChangeset for help on using the changeset viewer.