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

Method command_UpdateResources

Tools/LayoutEditor/EditorState.cpp:584–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582 }
583
584 void EditorState::command_UpdateResources(const MyGUI::UString& _commandName, bool& _result)
585 {
586 if (!checkCommand())
587 return;
588
589 SettingsManager::VectorString resources =
590 SettingsManager::getInstance().getValueList("Resources/UpdateResource.List");
591 if (resources.empty())
592 return;
593
594 for (auto& resource : resources)
595 MyGUI::ResourceManager::getInstance().load(resource);
596
597 MyGUI::xml::Document* savedDoc = EditorWidgets::getInstance().savexmlDocument();
598 EditorWidgets::getInstance().clear();
599 EditorWidgets::getInstance().loadxmlDocument(savedDoc);
600 delete savedDoc;
601 WidgetSelectorManager::getInstance().setSelectedWidget(nullptr);
602
603 _result = true;
604 }
605
606}

Callers

nothing calls this directly

Calls 7

getValueListMethod · 0.80
savexmlDocumentMethod · 0.80
loadxmlDocumentMethod · 0.80
setSelectedWidgetMethod · 0.80
emptyMethod · 0.45
loadMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected