| 174 | } |
| 175 | |
| 176 | const WidgetInfo* Widget::initialiseWidgetSkinBase(ResourceSkin* _skinInfo, ResourceLayout* _templateInfo) |
| 177 | { |
| 178 | const WidgetInfo* root = nullptr; |
| 179 | bool skinOnly = false; |
| 180 | |
| 181 | if (_skinInfo == nullptr) |
| 182 | { |
| 183 | skinOnly = true; |
| 184 | std::string_view skinName; |
| 185 | |
| 186 | const VectorWidgetInfo& data = _templateInfo->getLayoutData(); |
| 187 | for (const auto& item : data) |
| 188 | { |
| 189 | if (item.name == "Root") |
| 190 | { |
| 191 | skinName = item.skin; |
| 192 | root = &item; |
| 193 | break; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | _skinInfo = SkinManager::getInstance().getByName(skinName); |
| 198 | } |
| 199 | |
| 200 | //SAVE |
| 201 | const IntSize& _size = mCoord.size(); |
| 202 | |
| 203 | if (_skinInfo != nullptr) |
| 204 | { |
| 205 | //FIXME - явный вызов |
| 206 | Widget::setSize(_skinInfo->getSize()); |
| 207 | |
| 208 | _createSkinItem(_skinInfo); |
| 209 | } |
| 210 | |
| 211 | // выставляем альфу, корректировка по отцу автоматически |
| 212 | _updateAlpha(); |
| 213 | _updateEnabled(); |
| 214 | _updateVisible(); |
| 215 | |
| 216 | if (!skinOnly) |
| 217 | { |
| 218 | #ifndef MYGUI_DONT_USE_OBSOLETE |
| 219 | const MapString& properties = _skinInfo->getProperties(); |
| 220 | for (const auto& property : properties) |
| 221 | { |
| 222 | if (BackwardCompatibility::isIgnoreProperty(property.first)) |
| 223 | { |
| 224 | MYGUI_LOG( |
| 225 | Warning, |
| 226 | property.first |
| 227 | << " skin property is deprecated, move it to UserString in a widget in ResourceLayout" |
| 228 | << LayoutManager::getInstance().getCurrentLayout() << "]"); |
| 229 | setUserString(property.first, property.second); |
| 230 | } |
| 231 | } |
| 232 | #endif |
| 233 |
nothing calls this directly
no test coverage detected