|
ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
|
Interface for a single UI element. More...
#include <ui_container.hpp>
Public Member Functions | |
| virtual glm::vec2 | getReferenceCoordinate () const =0 |
| Returns the reference coordinate on the container relative to which this element's offsets are defined. | |
| virtual glm::vec3 | getOffsets () const =0 |
| Returns the offsets relative to the container reference coordinates used to position this element's anchor. | |
| virtual bool | allowsDescendantControl () const =0 |
| Whether the container is permitted to reposition this element's children. | |
Interface for a single UI element.
@TODO: Improve reusability by actually having UI elements share certain data and instructions.
|
pure virtual |
Whether the container is permitted to reposition this element's children.
Implemented in ToyMaker::UIButton, ToyMaker::UIImage, ToyMaker::UIPanel, and ToyMaker::UIText.
|
pure virtual |
Returns the offsets relative to the container reference coordinates used to position this element's anchor.
Implemented in ToyMaker::UIButton, ToyMaker::UIImage, ToyMaker::UIPanel, and ToyMaker::UIText.
|
pure virtual |
Returns the reference coordinate on the container relative to which this element's offsets are defined.
(0, 0) represents the top left hand corner of the container, while (1, 1) represents the bottom-right hand corner of the container.
Implemented in ToyMaker::UIButton, ToyMaker::UIImage, ToyMaker::UIPanel, and ToyMaker::UIText.