Changeset 2850 for code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc
- Timestamp:
- Mar 25, 2009, 11:53:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc
r2844 r2850 53 53 void GSIOConsole::activate() 54 54 { 55 { 56 FunctorMember<GSIOConsole>* functor = createFunctor(&GSIOConsole::loadMenu); 57 functor->setObject(this); 58 this->ccLoadMenu_ = createConsoleCommand(functor, "loadMenu"); 59 CommandExecutor::addConsoleCommandShortcut(this->ccLoadMenu_); 60 } 55 61 } 56 62 57 63 void GSIOConsole::deactivate() 58 64 { 65 if (this->ccLoadMenu_) 66 { 67 delete this->ccLoadMenu_; 68 this->ccLoadMenu_ = 0; 69 } 59 70 } 60 71 61 72 void GSIOConsole::update(const Clock& time) 62 73 { 74 std::cout << ">"; 63 75 std::string command; 64 76 std::getline(std::cin, command); 65 77 CommandExecutor::execute(command, true); 66 78 } 79 80 void GSIOConsole::loadMenu() 81 { 82 Game::getInstance().popState(); 83 Game::getInstance().requestStates("graphics, mainMenu"); 84 } 67 85 }
Note: See TracChangeset
for help on using the changeset viewer.