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

Method command_FileDrop

Tools/LayoutEditor/EditorState.cpp:237–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235 }
236
237 void EditorState::command_FileDrop(const MyGUI::UString& _commandName, bool& _result)
238 {
239 if (!checkCommand())
240 return;
241
242 mDropFileName = CommandManager::getInstance().getCommandData();
243 if (mDropFileName.empty())
244 return;
245
246 if (UndoManager::getInstance().isUnsaved())
247 {
248 MyGUI::Message* message = MessageBoxManager::getInstance().create(
249 replaceTags("Warning"),
250 replaceTags("MessageUnsavedData"),
251 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
252 MyGUI::MessageBoxStyle::Cancel);
253 message->eventMessageBoxResult +=
254 MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultLoadDropFile);
255 }
256 else
257 {
258 clear();
259
260 loadDropFile();
261 }
262
263 _result = true;
264 }
265
266 void EditorState::command_SaveItemAs(const MyGUI::UString& _commandName, bool& _result)
267 {

Callers

nothing calls this directly

Calls 6

replaceTagsFunction · 0.85
newDelegateFunction · 0.85
clearFunction · 0.85
isUnsavedMethod · 0.80
emptyMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected