MCPcopy Create free account
hub / github.com/MyGUI/mygui / commandQuit

Method commandQuit

Tools/SkinEditor/EditorState.cpp:190–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188 }
189
190 void EditorState::commandQuit(const MyGUI::UString& _commandName, bool& _result)
191 {
192 if (!checkCommand())
193 return;
194
195 if (ActionManager::getInstance().getChanges())
196 {
197 MyGUI::Message* message = MessageBoxManager::getInstance().create(
198 replaceTags("Warning"),
199 replaceTags("MessageUnsavedData"),
200 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
201 MyGUI::MessageBoxStyle::Cancel);
202 message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultQuit);
203 }
204 else
205 {
206 StateManager::getInstance().stateEvent(this, "Exit");
207 }
208
209 _result = true;
210 }
211
212 void EditorState::commandFileDrop(const MyGUI::UString& _commandName, bool& _result)
213 {

Callers

nothing calls this directly

Calls 5

replaceTagsFunction · 0.85
newDelegateFunction · 0.85
stateEventMethod · 0.80
getChangesMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected