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

Method loadOldSkinFormat

MyGUIEngine/src/MyGUI_BackwardCompatibility.cpp:1010–1035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008 return ResourceManager::getInstance().load(_file);
1009 }
1010 void MemberObsolete<SkinManager>::loadOldSkinFormat(
1011 xml::ElementPtr _node,
1012 std::string_view /*_file*/,
1013 Version _version,
1014 std::string_view _tag)
1015 {
1016 const std::string& resourceCategory = ResourceManager::getInstance().getCategoryName();
1017
1018 // берем детей и крутимся, основной цикл со скинами
1019 xml::ElementEnumerator skin = _node->getElementEnumerator();
1020 while (skin.next(_tag))
1021 {
1022 std::string_view type = skin->findAttribute("type");
1023 if (type.empty())
1024 type = "ResourceSkin";
1025
1026 IObject* object = FactoryManager::getInstance().createObject(resourceCategory, type);
1027 if (object != nullptr)
1028 {
1029 ResourceSkin* data = object->castType<ResourceSkin>();
1030 data->deserialization(skin.current(), _version);
1031
1032 ResourceManager::getInstance().addResource(data);
1033 }
1034 }
1035 }
1036
1037
1038 void MemberObsolete<WidgetManager>::destroyWidgetsVector(VectorWidgetPtr& _widgets)

Callers

nothing calls this directly

Calls 8

getElementEnumeratorMethod · 0.80
findAttributeMethod · 0.80
addResourceMethod · 0.80
nextMethod · 0.45
emptyMethod · 0.45
createObjectMethod · 0.45
deserializationMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected