Changeset 7868 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- May 26, 2006, 1:21:32 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.cc
r7764 r7868 65 65 66 66 // EVENT-Handler subscription of '`' to all States. 67 EventHandler::getInstance()->subscribe(this,ES_ALL, SDLK_BACKQUOTE);68 EventHandler::getInstance()->subscribe(this,ES_ALL, SDLK_F12);69 EventHandler::getInstance()->subscribe(this,ES_SHELL, SDLK_PAGEUP);70 EventHandler::getInstance()->subscribe(this,ES_SHELL, SDLK_PAGEDOWN);71 EventHandler::getInstance()->subscribe(this,ES_SHELL, EV_VIDEO_RESIZE);67 this->subscribeEvent(ES_ALL, SDLK_BACKQUOTE); 68 this->subscribeEvent(ES_ALL, SDLK_F12); 69 this->subscribeEvent(ES_SHELL, SDLK_PAGEUP); 70 this->subscribeEvent(ES_SHELL, SDLK_PAGEDOWN); 71 this->subscribeEvent(ES_SHELL, EV_VIDEO_RESIZE); 72 72 73 73 // BUFFER -
trunk/src/lib/shell/shell_input.cc
r7858 r7868 20 20 #include "shell_command.h" 21 21 #include "shell_command_class.h" 22 #include "event_handler.h"23 22 24 23 #include "debug.h" … … 50 49 this->setRepeatDelay(.3, .05); 51 50 52 // subscribe all keyboard commands to ES_SEHLL 53 EventHandler* evh = EventHandler::getInstance(); 51 // subscribe all keyboard commands to ES_SHELL 54 52 for (int i = 1; i < SDLK_LAST; i++) 55 53 { 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); 58 56 } 59 57 // 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); 64 62 65 63 }
Note: See TracChangeset
for help on using the changeset viewer.