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

Method commandQuit

Tools/FontEditor/EditorState.cpp:202–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201
202 void EditorState::commandQuit(const MyGUI::UString& _commandName, bool& _result)
203 {
204 if (!checkCommand())
205 return;
206
207 if (ActionManager::getInstance().getChanges())
208 {
209 MyGUI::Message* message = MessageBoxManager::getInstance().create(
210 replaceTags("Warning"),
211 replaceTags("MessageUnsavedData"),
212 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
213 MyGUI::MessageBoxStyle::Cancel);
214 message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultQuit);
215 }
216 else
217 {
218 StateManager::getInstance().stateEvent(this, "Exit");
219 }
220
221 _result = true;
222 }
223
224 void EditorState::commandFileDrop(const MyGUI::UString& _commandName, bool& _result)
225 {

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