7#ifndef MYGUI_COMMON_STATE_INFO_H_
8#define MYGUI_COMMON_STATE_INFO_H_
33 std::string texture =
_node->getParent()->getParent()->findAttribute(
"texture");
38 texture = LanguageManager::getInstance().replaceTags(texture);
41 const IntSize& size = texture_utility::getTextureSize(texture);
42 const IntCoord& coord = IntCoord::parse(_node->
findAttribute(
"offset"));
43 mRect = CoordConverter::convertTextureCoord(coord, size);
85 std::string texture =
_node->getParent()->getParent()->findAttribute(
"texture");
90 texture = LanguageManager::getInstance().replaceTags(texture);
93 const IntSize& size = texture_utility::getTextureSize(texture);
94 const IntCoord& coord = IntCoord::parse(_node->
findAttribute(
"offset"));
95 mRect = CoordConverter::convertTextureCoord(coord, size);
98 while (prop.next(
"Property"))
101 const std::string& value = prop->findAttribute(
"value");
102 if (key ==
"TileH") mTileH = utility::parseBool(value);
103 else if (key ==
"TileV") mTileV = utility::parseBool(value);
104 else if (key ==
"TileSize") mTileSize = IntSize::parse(value);
147 const std::string& key =
prop->findAttribute(
"key");
148 const std::string& value =
prop->findAttribute(
"value");
149 if (key ==
"Angle") mAngle = utility::parseFloat(value);
150 if (key ==
"Center") mCenter = IntPoint::parse(value);
156 if (_version >= Version(1, 1))
158 texture = LanguageManager::getInstance().replaceTags(texture);
161 const IntSize& size = texture_utility::getTextureSize(texture);
163 mRect = CoordConverter::convertTextureCoord(coord, size);
198 mShift = utility::parseBool(
_node->findAttribute(
"shift"));
200 std::string colour =
_node->findAttribute(
"colour");
203 colour = LanguageManager::getInstance().replaceTags(colour);
206 mColour = Colour::parse(colour);
#define MYGUI_RTTI_DERIVED(DerivedType)
const Colour & getColour() const
const IntPoint & getCenter() const
const FloatRect & getRect() const
const FloatRect & getRect() const
const FloatRect & getRect() const
const IntSize & getTileSize() const
ElementEnumerator getElementEnumerator()
ElementPtr getParent() const
bool findAttribute(const std::string &_name, std::string &_value)
types::TCoord< int > IntCoord
types::TSize< int > IntSize
types::TRect< float > FloatRect
types::TPoint< int > IntPoint