|
| SpriteElement (const std::string textureName, Vector2 size={ 1, 1 }, Vector2 position={ 0, 0 }, int ZOrder=0) |
| Constructs a SpriteElement with a texture name, size, position, and Z order.
|
|
| SpriteElement (Vector2 size={ 1, 1 }, Vector2 position={ 0, 0 }, int ZOrder=0) |
| Constructs a SpriteElement with size, position, and Z order. No texture is set.
|
|
| SpriteElement (Texture *texture, Vector2 size={ 1, 1 }, Vector2 position={ 0, 0 }, int ZOrder=0) |
| Constructs a SpriteElement with a texture pointer, size, position, and Z order.
|
|
| ~SpriteElement ()=default |
| Destructor for SpriteElement.
|
|
virtual Transform2D | GetTransform () const override |
| Gets the transform of the sprite element.
|
|
virtual Vector2 | GetSize () const override |
| Gets the size of the sprite element.
|
|
virtual void | Update () override |
| Updates the sprite element. (No-op in this implementation.)
|
|
virtual void | Draw (RendererGL *renderer) override |
| Draws the sprite element using the provided renderer.
|
|
void | SetTexture (Texture *pTexture) |
| Sets the texture for the sprite element.
|
|
void | SetTexture (std::string pTexture) |
| Sets the texture for the sprite element by texture name.
|
|
Texture * | GetTexture () const |
| Gets the current texture of the sprite element.
|
|
| WidgetElement (Vector2 size={ 1, 1 }, Vector2 position={ 0, 0 }, int ZOrder=0) |
| Constructs a WidgetElement with given size, position, and Z-order.
|
|
| ~WidgetElement ()=default |
| Default destructor.
|
|
int | GetZOrder () const |
| Gets the Z-order of the widget.
|
|
void | SetZOrder (int ZOrder) |
| Sets the Z-order and updates the widget order in the owner panel.
|
|
Vector2 | GetPosition () const |
| Gets the position of the widget.
|
|
float | GetRotation () const |
| Gets the rotation of the widget.
|
|
void | SetSize (Vector2 size) |
| Sets the size of the widget.
|
|
void | SetSize (float size) |
| Sets the size of the widget (uniform scale).
|
|
void | SetAnchor (Anchor anchor) |
| Sets the anchor type for the widget.
|
|
void | SetPosition (Vector2 position) |
| Sets the position of the widget.
|
|
void | SetRotation (float rotation) |
| Sets the rotation of the widget.
|
|
void | ToggleVisibility () |
| Toggles the visibility of the widget.
|
|
Represents a UI element that displays a textured sprite. Inherits from WidgetElement and provides functionality for rendering a texture.