|
|
| FlipbookElement ()=delete |
| | Deleted default constructor.
|
| |
| | FlipbookElement (const std::vector< Texture * > pTexture, bool pLooping=true, float pAnimFps=24, Vector2 size={ 1.0f, 1.0f }, Vector2 position={ 0, 0 }, int ZOrder=0) |
| | Constructs a FlipbookElement.
|
| |
| std::vector< Texture * > | GetFlipbookTextures () const |
| | Gets the flipbook textures.
|
| |
| bool | GetLooping () const |
| | Gets whether the animation is looping.
|
| |
| void | SetFlipbookTextures (const std::vector< Texture * > pTextures) |
| | Sets the flipbook textures.
|
| |
| void | SetFlipbookFps (float pFps) |
| | Sets the animation FPS.
|
| |
| void | SetLooping (bool pLooping) |
| | Sets whether the animation should loop.
|
| |
| float | GetFlipbookFps () const |
| | Gets the animation FPS.
|
| |
|
void | Play () |
| | Plays the animation (unpauses).
|
| |
|
void | PlayFromStart () |
| | Plays the animation from the start.
|
| |
|
void | Pause () |
| | Pauses the animation.
|
| |
|
void | Toggle () |
| | Toggles the paused state of the animation.
|
| |
| virtual void | Update () override |
| | Updates the animation state. Should be called every frame.
|
| |
| | 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 | 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.
|
| |
UI element for displaying animated flipbook sprites.
FlipbookElement manages a sequence of textures to create a frame-by-frame animation. It supports looping, pausing, and FPS control.