| 81 | } |
| 82 | |
| 83 | void MenuModeEditorNew::activate() |
| 84 | { |
| 85 | // Loads the corresponding Gui sheet. |
| 86 | getModeManager().getGui().loadGuiSheet(Gui::editorNewMenu); |
| 87 | |
| 88 | giveFocus(); |
| 89 | |
| 90 | // Play the main menu music |
| 91 | MusicPlayer::getSingleton().play(ConfigManager::getSingleton().getMainMenuMusic()); |
| 92 | |
| 93 | GameMap* gameMap = ODFrameListener::getSingleton().getClientGameMap(); |
| 94 | gameMap->clearAll(); |
| 95 | gameMap->setGamePaused(true); |
| 96 | |
| 97 | CEGUI::Window* window = getModeManager().getGui().getGuiSheet(Gui::guiSheet::editorNewMenu); |
| 98 | CEGUI::Combobox* levelTypeCb = static_cast<CEGUI::Combobox*>(window->getChild(LIST_LEVEL_TYPES)); |
| 99 | levelTypeCb->setItemSelectState(static_cast<size_t>(0), true); |
| 100 | |
| 101 | window->getChild(TEXT_LOADING)->setText(""); |
| 102 | } |
| 103 | |
| 104 | bool MenuModeEditorNew::launchSelectedButtonPressed(const CEGUI::EventArgs&) |
| 105 | { |
nothing calls this directly
no test coverage detected