Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7866 in orxonox.OLD for branches/gui/src/lib/shell/shell_input.cc


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

Events are subscribed at the EventListener, and not the EventHandler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/shell/shell_input.cc

    r7858 r7866  
    2020#include "shell_command.h"
    2121#include "shell_command_class.h"
    22 #include "event_handler.h"
    2322
    2423#include "debug.h"
     
    5049    this->setRepeatDelay(.3, .05);
    5150
    52     // subscribe all keyboard commands to ES_SEHLL
    53     EventHandler* evh = EventHandler::getInstance();
     51    // subscribe all keyboard commands to ES_SHELL
    5452    for (int i = 1; i < SDLK_LAST; i++)
    5553    {
    56       if (!evh->isSubscribed(ES_SHELL, i))
    57         evh->subscribe(this, ES_SHELL, i);
     54      if (!this->isEventSubscribed(ES_SHELL, i))
     55        this->subscribeEvent(ES_SHELL, i);
    5856    }
    5957    // unsubscribe unused TODO improve.
    60     evh->unsubscribe(ES_SHELL, SDLK_BACKQUOTE);
    61     evh->unsubscribe(ES_SHELL, SDLK_F12);
    62     evh->unsubscribe(ES_SHELL, SDLK_PAGEUP);
    63     evh->unsubscribe(ES_SHELL, SDLK_PAGEDOWN);
     58    this->unsubscribeEvent(ES_SHELL, SDLK_BACKQUOTE);
     59    this->unsubscribeEvent(ES_SHELL, SDLK_F12);
     60    this->unsubscribeEvent(ES_SHELL, SDLK_PAGEUP);
     61    this->unsubscribeEvent(ES_SHELL, SDLK_PAGEDOWN);
    6462
    6563  }
Note: See TracChangeset for help on using the changeset viewer.