75 static std::shared_ptr<BaseSimObjectAspect>
create(
const nlohmann::json& jsonAspectProperties);
83 std::shared_ptr<BaseSimObjectAspect>
clone()
const override;
An object containing closely related methods and data, and exposing object lifecycle and application ...
Definition sim_system.hpp:956
void updateAnchor(glm::vec2 anchor)
Updates the point considered the new origin for this object, where (0,0) represents the top left corn...
Definition ui_panel.cpp:38
void updateContentSize(glm::vec2 contentSize)
Updates the size of the central region of the NineSlicePanel.
Definition ui_panel.cpp:33
static std::shared_ptr< BaseSimObjectAspect > create(const nlohmann::json &jsonAspectProperties)
Constructs a new UIPanel instance based on its JSON description.
Definition ui_panel.cpp:6
std::shared_ptr< NineSlicePanel > mBasePanel
The panel resource used to create this texture.
Definition ui_panel.hpp:124
UIPanel()
Constructs a new UIPanel aspect.
Definition ui_panel.hpp:59
static std::string getSimObjectAspectTypeName()
Gets the aspect type string associated with this class.
Definition ui_panel.hpp:67
void recomputeTexture()
The method responsible for actually creating the new texture through the loaded panel resource.
Definition ui_panel.cpp:63
void updateBasePanel(std::shared_ptr< NineSlicePanel > newPanel)
Changes the panel resource used to create this object's panel texture.
Definition ui_panel.cpp:43
std::shared_ptr< BaseSimObjectAspect > clone() const override
Constructs a new UIPanel instance using this one as a blueprint.
Definition ui_panel.cpp:49
glm::vec2 mContentSize
The size of the central area of the nine slice panel in which content can be displayed.
Definition ui_panel.hpp:130
glm::vec2 mAnchor
The point considered the origin of this object, where (0,0) represents the top left corner and (1,...
Definition ui_panel.hpp:136
void onActivated() override
Loads and renders the texture of a panel per its configuration.
Definition ui_panel.cpp:59
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition application.hpp:24
Contains class defining this project's implementation of nine-slice (or nine-region) resizable panels...
Classes and structs relating to the SimSystem, the system responsible for providing some level of gen...