29 virtual void draw()
override;
Contains the declaration of the ScriptComponent class and related data structures.
Contains the declaration of the UIComponent class, a base class for user interface of objects' compon...
A class representing a user interface component for interacting with scripts.
Definition: ScriptUIComponent.hpp:23
static constexpr float LABEL_MARGIN
The margin used for labeling elements in the UI.
Definition: ScriptUIComponent.hpp:35
void drawVariables()
Draw the script variables in the UI.
Definition: ScriptUIComponent.cpp:95
std::shared_ptr< ScriptComponent > _script
A shared pointer to the associated script component.
Definition: ScriptUIComponent.hpp:82
void drawIntVariable(PublicInt &variable)
Draw an integer variable in the UI.
Definition: ScriptUIComponent.cpp:129
virtual void draw() override
Implementation of the abstract draw method to render the UI for this component.
Definition: ScriptUIComponent.cpp:15
void drawScriptFile()
Draw the script file and its contents in the UI.
Definition: ScriptUIComponent.cpp:55
void drawFloatVariable(PublicFloat &variable)
Draw a float variable in the UI.
Definition: ScriptUIComponent.cpp:121
void drawVec3Variable(PublicVec3 &variable)
Draw a glm::vec3 variable in the UI.
Definition: ScriptUIComponent.cpp:149
void replaceScript(std::filesystem::path path)
Replace the current script with a new one from the specified file path.
Definition: ScriptUIComponent.cpp:35
void drawStringVariable(PublicString &variable)
Draw a string variable in the UI.
Definition: ScriptUIComponent.cpp:137
A base class representing a user interface (UI) for a game object's component.
Definition: UIComponent.hpp:21
UIComponent(std::string name, std::shared_ptr< GameObject > object)
Constructor to create a UI component with a specified name and associated game object.
Definition: UIComponent.cpp:6
Structure to represent a public float variable for use in scripts.
Definition: ScriptComponent.hpp:17
Structure to represent a public integer variable for use in scripts.
Definition: ScriptComponent.hpp:25
Structure to represent a public string variable for use in scripts.
Definition: ScriptComponent.hpp:33
Structure to represent a public glm::vec3 variable for use in scripts.
Definition: ScriptComponent.hpp:41