Changeset 3094
- Timestamp:
- May 27, 2009, 9:42:13 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gamestates/GSMainMenu.cc
r3060 r3094 73 73 74 74 { 75 FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::start Game);75 FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startStandalone); 76 76 functor->setObject(this); 77 this->ccStartGame_ = createConsoleCommand(functor, "startGame"); 78 CommandExecutor::addConsoleCommandShortcut(this->ccStartGame_); 77 this->ccStartStandalone_ = createConsoleCommand(functor, "startGame"); 78 CommandExecutor::addConsoleCommandShortcut(this->ccStartStandalone_); 79 } 80 { 81 FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startServer); 82 functor->setObject(this); 83 this->ccStartServer_ = createConsoleCommand(functor, "startServer"); 84 CommandExecutor::addConsoleCommandShortcut(this->ccStartServer_); 85 } 86 { 87 FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startClient); 88 functor->setObject(this); 89 this->ccStartClient_ = createConsoleCommand(functor, "startClient"); 90 CommandExecutor::addConsoleCommandShortcut(this->ccStartClient_); 91 } 92 { 93 FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startDedicated); 94 functor->setObject(this); 95 this->ccStartDedicated_ = createConsoleCommand(functor, "startDedicated"); 96 CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_); 79 97 } 80 98 … … 110 128 } 111 129 112 void GSMainMenu::start Game()130 void GSMainMenu::startStandalone() 113 131 { 114 132 // HACK - HACK … … 116 134 Game::getInstance().requestStates("standalone, level"); 117 135 } 136 137 void GSMainMenu::startServer() 138 { 139 // HACK - HACK 140 Game::getInstance().popState(); 141 Game::getInstance().requestStates("server, level"); 142 } 143 144 void GSMainMenu::startClient() 145 { 146 // HACK - HACK 147 Game::getInstance().popState(); 148 Game::getInstance().requestStates("client, level"); 149 } 150 151 void GSMainMenu::startDedicated() 152 { 153 // HACK - HACK 154 Game::getInstance().popState(); 155 Game::getInstance().popState(); 156 Game::getInstance().requestStates("dedicated, level"); 157 } 118 158 } -
code/trunk/src/orxonox/gamestates/GSMainMenu.h
r3060 r3094 46 46 void update(const Clock& time); 47 47 48 void startGame(); 48 void startStandalone(); 49 void startServer(); 50 void startClient(); 51 void startDedicated(); 49 52 50 53 private: … … 54 57 55 58 // console commands 56 ConsoleCommand* ccStartGame_; 59 ConsoleCommand* ccStartStandalone_; 60 ConsoleCommand* ccStartServer_; 61 ConsoleCommand* ccStartClient_; 62 ConsoleCommand* ccStartDedicated_; 57 63 58 64 // ambient sound for the main menu
Note: See TracChangeset
for help on using the changeset viewer.