| 140 | } |
| 141 | |
| 142 | void MenuModeMain::activate() |
| 143 | { |
| 144 | // Loads the corresponding Gui sheet. |
| 145 | getModeManager().getGui().loadGuiSheet(Gui::mainMenu); |
| 146 | CEGUI::Window* window = getModeManager().getGui().getGuiSheet(Gui::mainMenu); |
| 147 | OD_ASSERT_TRUE(window != nullptr); |
| 148 | |
| 149 | window->getChild(WINDOW_SKIRMISH)->hide(); |
| 150 | window->getChild(WINDOW_MULTIPLAYER)->hide(); |
| 151 | window->getChild(WINDOW_EDITOR)->hide(); |
| 152 | |
| 153 | giveFocus(); |
| 154 | |
| 155 | TextRenderer::getSingleton().setText(ODApplication::POINTER_INFO_STRING, ""); |
| 156 | |
| 157 | // Play the main menu music |
| 158 | MusicPlayer::getSingleton().play(ConfigManager::getSingleton().getMainMenuMusic()); |
| 159 | |
| 160 | GameMap* gameMap = ODFrameListener::getSingletonPtr()->getClientGameMap(); |
| 161 | gameMap->clearAll(); |
| 162 | gameMap->setGamePaused(true); |
| 163 | |
| 164 | ODFrameListener::getSingleton().stopGameRenderer(); |
| 165 | ODFrameListener::getSingleton().createMainMenuScene(); |
| 166 | } |
| 167 | |
| 168 | void MenuModeMain::connectModeChangeEvent(const std::string& buttonName, AbstractModeManager::ModeType mode) |
| 169 | { |
nothing calls this directly
no test coverage detected