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

Method updateTexture

Tools/FontEditor/FontTextureController.cpp:119–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void FontTextureController::updateTexture(std::string_view _value)
120 {
121 MyGUI::IResource* resource = MyGUI::ResourceManager::getInstance().findByName(_value);
122 MyGUI::ResourceTrueTypeFont* font =
123 resource != nullptr ? resource->castType<MyGUI::ResourceTrueTypeFont>(false) : nullptr;
124
125 MyGUI::ITexture* texture = font != nullptr ? font->getTextureFont() : nullptr;
126 MyGUI::UString value;
127 if (texture != nullptr)
128 value = texture->getName();
129
130 mControl->setTextureValue(value);
131 mControl->resetTextureRegion();
132 }
133
134 void FontTextureController::commandGenerateFont(const MyGUI::UString& _commandName, bool& _result)
135 {

Callers

nothing calls this directly

Calls 4

findByNameMethod · 0.80
setTextureValueMethod · 0.80
resetTextureRegionMethod · 0.80
getTextureFontMethod · 0.45

Tested by

no test coverage detected