void StrangeButton::initialiseWidgetSkin(MyGUI::ResourceSkin* _info) { // парсим свойства const MyGUI::MapString& properties = _info->getProperties(); if (!properties.empty()) { MyGUI::MapString::const_iterator iter = properties.find("ButtonPressed"); if (iter != properties.end()) setButtonPressed(MyGUI::utility::parseBool(iter->second)); iter = properties.find("StateCheck"); if (iter != properties.end()) setStateCheck(MyGUI::utility::parseBool(iter->second)); } }
void Button::initialiseWidgetSkin(WidgetSkinInfoPtr _info) { // парсим свойства const MapString & properties = _info->getProperties(); if (!properties.empty()) { MapString::const_iterator iter = properties.find("ButtonPressed"); if (iter != properties.end()) setButtonPressed(utility::parseBool(iter->second)); iter = properties.find("StateCheck"); if (iter != properties.end()) setStateCheck(utility::parseBool(iter->second)); } for (VectorWidgetPtr::iterator iter=mWidgetChildSkin.begin(); iter!=mWidgetChildSkin.end(); ++iter) { if (*(*iter)->_getInternalData<std::string>() == "Image") { MYGUI_DEBUG_ASSERT( ! mImage, "widget already assigned"); mImage = (*iter)->castType<StaticImage>(); } } }