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

Method commandClear

Tools/SkinEditor/EditorState.cpp:168–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 void EditorState::commandClear(const MyGUI::UString& _commandName, bool& _result)
169 {
170 if (!checkCommand())
171 return;
172
173 if (ActionManager::getInstance().getChanges())
174 {
175 MyGUI::Message* message = MessageBoxManager::getInstance().create(
176 replaceTags("Warning"),
177 replaceTags("MessageUnsavedData"),
178 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
179 MyGUI::MessageBoxStyle::Cancel);
180 message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultClear);
181 }
182 else
183 {
184 clear();
185 }
186
187 _result = true;
188 }
189
190 void EditorState::commandQuit(const MyGUI::UString& _commandName, bool& _result)
191 {

Callers

nothing calls this directly

Calls 5

replaceTagsFunction · 0.85
newDelegateFunction · 0.85
clearFunction · 0.85
getChangesMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected