| 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 | { |