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

Method getByName

MyGUIEngine/src/MyGUI_FontManager.cpp:89–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 IFont* FontManager::getByName(std::string_view _name) const
90 {
91 IResource* result = nullptr;
92 //FIXME для совместимости шрифт может иметь имя Default
93 if (!_name.empty() && _name != mXmlDefaultFontValue)
94 result = ResourceManager::getInstance().getByName(_name, false);
95
96 if (result == nullptr)
97 {
98 result = ResourceManager::getInstance().getByName(mDefaultName, false);
99 if (!_name.empty() && _name != mXmlDefaultFontValue)
100 {
101 MYGUI_LOG(Error, "Font '" << _name << "' not found. Replaced with default font.");
102 }
103 }
104
105 return result ? result->castType<IFont>(false) : nullptr;
106 }
107
108 const std::string& FontManager::getDefaultFont() const
109 {

Callers 15

setPointerMethod · 0.45
getTextureMethod · 0.45
createShaderMethod · 0.45
parseTextMethod · 0.45
updateBreakHeightMethod · 0.45
updateDataMethod · 0.45
notifyCommandMethod · 0.45
updateMethod · 0.45
ItemDataMethod · 0.45
addContextMethod · 0.45
deserializationMethod · 0.45
setFontNameMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected