Shkyera Engine
Easy to use, game engine for Python
|
A specialized UIComponent for rendering shapes within a graphical user interface. More...
#include <ShapeUIComponent.hpp>
Public Member Functions | |
virtual | ~ShapeUIComponent ()=default |
Virtual destructor for ShapeUIComponent. More... | |
virtual void | draw () override |
Draw the shape within the UI component. More... | |
virtual void | drawOptions ()=0 |
Draw options specific to the shape. More... | |
virtual void | initialize (std::shared_ptr< Renderer > renderer)=0 |
Initialize the ShapeUIComponent. More... | |
UIComponent (std::string name, std::shared_ptr< GameObject > object) | |
Constructor for ShapeUIComponent. More... | |
Public Member Functions inherited from shkyera::UIComponent | |
UIComponent (std::string name, std::shared_ptr< GameObject > object) | |
Constructor to create a UI component with a specified name and associated game object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from shkyera::UIComponent | |
static void | addComponentToObject (std::shared_ptr< GameObject > object, std::shared_ptr< UIComponent > component) |
Static method to add a UI component to a game object. More... | |
static std::vector< std::shared_ptr< UIComponent > > | getComponentsOfObject (std::shared_ptr< GameObject > object) |
Static method to retrieve a list of UI components associated with a game object. More... | |
Protected Attributes inherited from shkyera::UIComponent | |
uint64_t | _uuid |
A unique identifier for the UI component. More... | |
std::string | _name |
The name of the UI component. More... | |
std::shared_ptr< GameObject > | _object |
The game object associated with the UI component. More... | |
A specialized UIComponent for rendering shapes within a graphical user interface.
The ShapeUIComponent class extends the basic UIComponent class and provides methods for drawing shapes and handling their options. This class should be further subclassed to implement specific shapes and their drawing logic.
|
virtualdefault |
Virtual destructor for ShapeUIComponent.
|
overridevirtual |
Draw the shape within the UI component.
This method is responsible for rendering the UI component. Subclasses should implement this method to define the drawing behavior for their specific shape type.
Implements shkyera::UIComponent.
|
pure virtual |
Draw options specific to the shape.
This pure virtual method should be implemented by subclasses to draw shape-specific options within the user interface, if applicable.
Implemented in shkyera::ShapeRectangleUIComponent, shkyera::ShapeLineUIComponent, and shkyera::ShapeCircleUIComponent.
|
pure virtual |
Initialize the ShapeUIComponent.
Subclasses should implement this method to perform any initialization steps required for their specific shape rendering. In particular, they should assign the renderer.
renderer | A shared pointer to the Renderer used for rendering. |
Implemented in shkyera::ShapeRectangleUIComponent, shkyera::ShapeLineUIComponent, and shkyera::ShapeCircleUIComponent.
shkyera::UIComponent::UIComponent |
Constructor for ShapeUIComponent.