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

Method command_Quit

Tools/LayoutEditor/EditorState.cpp:215–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 }
214
215 void EditorState::command_Quit(const MyGUI::UString& _commandName, bool& _result)
216 {
217 if (!checkCommand())
218 return;
219
220 if (UndoManager::getInstance().isUnsaved())
221 {
222 MyGUI::Message* message = MessageBoxManager::getInstance().create(
223 replaceTags("Warning"),
224 replaceTags("MessageUnsavedData"),
225 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
226 MyGUI::MessageBoxStyle::Cancel);
227 message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultQuit);
228 }
229 else
230 {
231 StateManager::getInstance().stateEvent(this, "Exit");
232 }
233
234 _result = true;
235 }
236
237 void EditorState::command_FileDrop(const MyGUI::UString& _commandName, bool& _result)
238 {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected