| 103 | } |
| 104 | |
| 105 | void MenuModeEditorLoad::activate() |
| 106 | { |
| 107 | // Loads the corresponding Gui sheet. |
| 108 | getModeManager().getGui().loadGuiSheet(Gui::editorLoadMenu); |
| 109 | |
| 110 | giveFocus(); |
| 111 | |
| 112 | // Play the main menu music |
| 113 | MusicPlayer::getSingleton().play(ConfigManager::getSingleton().getMainMenuMusic()); |
| 114 | |
| 115 | GameMap* gameMap = ODFrameListener::getSingleton().getClientGameMap(); |
| 116 | gameMap->clearAll(); |
| 117 | gameMap->setGamePaused(true); |
| 118 | |
| 119 | CEGUI::Combobox* levelTypeCb = static_cast<CEGUI::Combobox*>(getModeManager().getGui(). |
| 120 | getGuiSheet(Gui::editorLoadMenu)->getChild(Gui::EDM_LIST_LEVEL_TYPES)); |
| 121 | levelTypeCb->setItemSelectState(static_cast<size_t>(0), true); |
| 122 | updateFilesList(); |
| 123 | } |
| 124 | |
| 125 | static bool findFileStemIn(const std::vector<std::string>& fileList, std::string filename) |
| 126 | { |
nothing calls this directly
no test coverage detected