7#ifndef MYGUI_COMMON_STATE_INFO_H_
8#define MYGUI_COMMON_STATE_INFO_H_
32 std::string texture{
_node->getParent()->getParent()->findAttribute(
"texture")};
35 if (_version >= Version(1, 1))
37 texture = LanguageManager::getInstance().replaceTags(texture);
40 const IntSize& size = texture_utility::getTextureSize(texture);
42 mRect = CoordConverter::convertTextureCoord(coord, size);
77 std::string texture{
_node->getParent()->getParent()->findAttribute(
"texture")};
80 if (_version >= Version(1, 1))
82 texture = LanguageManager::getInstance().replaceTags(texture);
85 const IntSize& size = texture_utility::getTextureSize(texture);
87 mRect = CoordConverter::convertTextureCoord(coord, size);
90 while (prop.next(
"Property"))
93 std::string_view value = prop->findAttribute(
"value");
95 mTileH = utility::parseBool(value);
96 else if (key ==
"TileV")
97 mTileV = utility::parseBool(value);
98 else if (key ==
"TileSize")
99 mTileSize = IntSize::parse(value);
136 std::string_view key =
prop->findAttribute(
"key");
137 std::string_view value =
prop->findAttribute(
"value");
139 mAngle = utility::parseFloat(value);
141 mCenter = IntPoint::parse(value);
147 if (_version >= Version(1, 1))
149 texture = LanguageManager::getInstance().replaceTags(texture);
152 const IntSize& size = texture_utility::getTextureSize(texture);
154 mRect = CoordConverter::convertTextureCoord(coord, size);
182 mShift = utility::parseBool(
_node->findAttribute(
"shift"));
184 std::string colour{
_node->findAttribute(
"colour")};
185 if (_version >= Version(1, 1))
187 colour = LanguageManager::getInstance().replaceTags(colour);
190 mColour = Colour::parse(colour);
194 Colour mColour{Colour::White};
#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
bool findAttribute(std::string_view _name, std::string &_value)
ElementEnumerator getElementEnumerator()
ElementPtr getParent() const
types::TCoord< int > IntCoord
types::TSize< int > IntSize
types::TRect< float > FloatRect
types::TPoint< int > IntPoint