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

Method activate

source/modes/MenuModeEditorNew.cpp:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void 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
104bool MenuModeEditorNew::launchSelectedButtonPressed(const CEGUI::EventArgs&)
105{

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected