MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / activate

Method activate

source/modes/MenuModeEditorLoad.cpp:105–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void 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
125static bool findFileStemIn(const std::vector<std::string>& fileList, std::string filename)
126{

Callers

nothing calls this directly

Calls 6

loadGuiSheetMethod · 0.80
getClientGameMapMethod · 0.80
clearAllMethod · 0.80
setGamePausedMethod · 0.80
getGuiSheetMethod · 0.80
playMethod · 0.45

Tested by

no test coverage detected