42 std::vector<Common::UString> tokens;
44 if (tokens.size() < 3)
48 _text->setText(tokens[0]);
50 _icon->setTexture(tokens[1]);
76 _icon->setPosition(x, y + (
_height - frameSize) / 2.0f, 0.0f);
80 _border->getPosition(bX, bY, bZ);
81 _border->setPosition(bX + frameSize, bY, bZ);
84 _border->getSize(width, height);
85 _border->setSize(width - frameSize, height);
90 _text->getPosition(tX, tY, tZ);
91 _text->setPosition(tX + frameSize, tY, tZ);
93 float width =
_text->getWidth();
94 float height =
_text->getHeight();
95 _text->setSize(width - frameSize, height);
100 _text->getColor(r, g, b, a);
107 _countText->setPosition(x - 4.0f, y + (
_height - frameSize) / 2.0f - 2.0f, 0.0f);
152 _iconFrame->setPosition(x + dx, y + dy, z + dz);
156 _icon->getPosition(x, y, z);
157 _icon->setPosition(x + dx, y + dy, z + dz);
162 _countText->setPosition(x + dx, y + dy, z + dz);
167 float deltaWidth =
_width - width;
Texture & getTexture() const
A class holding an UTF-8 string.
#define TextureMan
Shortcut for accessing the texture manager.
void reset(PointerType o=0)
Resets the pointer with the new value.
void setWidth(float width)
Set the width of the widget.
The Aurora texture manager.
KotORInventoryItem(GUI &gui, const Common::UString &tag)
void setContents(const Common::UString &contents)
Set item contents.
Utility templates and functions for working with strings and streams.
void hide()
Hide the widget.
Common::ScopedPtr< Graphics::Aurora::GUIQuad > _icon
Common::ScopedPtr< Graphics::Aurora::Text > _countText
void load(const Aurora::GFF3Struct &gff)
const float kVAlignBottom
void setPosition(float x, float y, float z)
Set the widget's position.
const float kVAlignMiddle
Low-level detection of architecture/system properties.
An inventory item widget for Star Wars: Knights of the Old Republic.
void split(iterator splitPoint, UString &left, UString &right, bool remove=false) const
A textured quad for a GUI element.
void parseString(const UString &str, T &value, bool allowEmpty)
Parse a string into any POD integer, float/double or bool type.
Common::ScopedPtr< Graphics::Aurora::GUIQuad > _iconFrame
#define FontMan
Shortcut for accessing the font manager.
void show()
Show the widget.