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

Method activate

source/modes/EditorMode.cpp:172–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void EditorMode::activate()
173{
174 // Loads the corresponding Gui sheet.
175 getModeManager().getGui().loadGuiSheet(Gui::editorModeGui);
176
177 // We free the menu scene as it is not required anymore
178 ODFrameListener::getSingleton().freeMainMenuScene();
179
180 CEGUI::Window* guiSheet = mRootWindow;
181 guiSheet->getChild("EditorOptionsWindow")->hide();
182 guiSheet->getChild("ConfirmExit")->hide();
183 // Hide also the Replay check-box as it doesn't make sense for the editor
184 guiSheet->getChild("ConfirmExit/SaveReplayCheckbox")->hide();
185 guiSheet->getChild("GameChatWindow/GameChatEditBox")->hide();
186
187 giveFocus();
188
189 // Stop the game music.
190 MusicPlayer::getSingleton().stop();
191
192 // By default, we set the current seat id to the connected player
193 Player* player = mGameMap->getLocalPlayer();
194 getModeManager().getInputManager().mSeatIdSelected = player->getSeat()->getId();
195
196 refreshGuiSkill();
197
198 mGameMap->setGamePaused(false);
199}
200
201bool EditorMode::mouseMoved(const OIS::MouseEvent &arg)
202{

Callers

nothing calls this directly

Calls 8

loadGuiSheetMethod · 0.80
freeMainMenuSceneMethod · 0.80
hideMethod · 0.80
getLocalPlayerMethod · 0.80
setGamePausedMethod · 0.80
stopMethod · 0.45
getIdMethod · 0.45
getSeatMethod · 0.45

Tested by

no test coverage detected