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

Method changeWidgetSkin

MyGUIEngine/src/MyGUI_Widget.cpp:143–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 void Widget::changeWidgetSkin(std::string_view _skinName)
144 {
145 ResourceSkin* skinInfo = nullptr;
146 ResourceLayout* templateInfo = nullptr;
147
148 if (LayoutManager::getInstance().isExist(_skinName))
149 templateInfo = LayoutManager::getInstance().getByName(_skinName);
150 else
151 skinInfo = SkinManager::getInstance().getByName(_skinName);
152
153 shutdownOverride();
154
155 saveLayerItem();
156
157 shutdownWidgetSkinBase();
158 const WidgetInfo* root = initialiseWidgetSkinBase(skinInfo, templateInfo);
159
160 restoreLayerItem();
161
162 initialiseOverride();
163
164 if (skinInfo != nullptr)
165 setSkinProperty(skinInfo);
166
167 if (root != nullptr)
168 {
169 for (const auto& property : root->properties)
170 {
171 setProperty(property.first, property.second);
172 }
173 }
174 }
175
176 const WidgetInfo* Widget::initialiseWidgetSkinBase(ResourceSkin* _skinInfo, ResourceLayout* _templateInfo)
177 {

Callers 5

step_change_skinFunction · 0.80
setItemTypeAtMethod · 0.80
_wrapItemMethod · 0.80

Calls 3

setPropertyFunction · 0.85
isExistMethod · 0.45
getByNameMethod · 0.45

Tested by

no test coverage detected