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

Method getByName

MyGUIEngine/src/MyGUI_SkinManager.cpp:80–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 ResourceSkin* SkinManager::getByName(std::string_view _name) const
81 {
82 std::string_view skinName = BackwardCompatibility::getSkinRename(_name);
83 IResource* result = nullptr;
84 if (!skinName.empty() && skinName != mXmlDefaultSkinValue)
85 result = ResourceManager::getInstance().getByName(skinName, false);
86
87 if (result == nullptr)
88 {
89 result = ResourceManager::getInstance().getByName(mDefaultName, false);
90 if (!skinName.empty() && skinName != mXmlDefaultSkinValue)
91 {
92 MYGUI_LOG(
93 Error,
94 "Skin '" << skinName << "' not found. Replaced with default skin."
95 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
96 }
97 }
98
99 return result ? result->castType<ResourceSkin>(false) : nullptr;
100 }
101
102 bool SkinManager::isExist(std::string_view _name) const
103 {

Callers 1

isExistMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected