A class representing a user interface component for interacting with scripts.
More...
#include <ScriptUIComponent.hpp>
A class representing a user interface component for interacting with scripts.
The ScriptUIComponent
class is a specialized UI component used to display and manage script-related information, including script files and their associated variables.
◆ draw()
void shkyera::ScriptUIComponent::draw |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of the abstract draw
method to render the UI for this component.
Implements shkyera::UIComponent.
◆ drawFloatVariable()
void shkyera::ScriptUIComponent::drawFloatVariable |
( |
PublicFloat & |
variable | ) |
|
|
private |
Draw a float variable in the UI.
- Parameters
-
variable | The float variable to render. |
◆ drawIntVariable()
void shkyera::ScriptUIComponent::drawIntVariable |
( |
PublicInt & |
variable | ) |
|
|
private |
Draw an integer variable in the UI.
- Parameters
-
variable | The integer variable to render. |
◆ drawScriptFile()
void shkyera::ScriptUIComponent::drawScriptFile |
( |
| ) |
|
|
private |
Draw the script file and its contents in the UI.
◆ drawStringVariable()
void shkyera::ScriptUIComponent::drawStringVariable |
( |
PublicString & |
variable | ) |
|
|
private |
Draw a string variable in the UI.
- Parameters
-
variable | The string variable to render. |
◆ drawVariables()
void shkyera::ScriptUIComponent::drawVariables |
( |
| ) |
|
|
private |
Draw the script variables in the UI.
◆ drawVec3Variable()
void shkyera::ScriptUIComponent::drawVec3Variable |
( |
PublicVec3 & |
variable | ) |
|
|
private |
Draw a glm::vec3 variable in the UI.
- Parameters
-
variable | The glm::vec3 variable to render. |
◆ replaceScript()
void shkyera::ScriptUIComponent::replaceScript |
( |
std::filesystem::path |
path | ) |
|
|
private |
Replace the current script with a new one from the specified file path.
- Parameters
-
path | The path to the new script file. |
◆ UIComponent()
shkyera::UIComponent::UIComponent |
|
private |
Constructor to create a UI component with a specified name and associated game object.
- Parameters
-
name | The name of the UI component. |
object | A shared pointer to the game object associated with the UI component. |
◆ _script
A shared pointer to the associated script component.
◆ LABEL_MARGIN
constexpr float shkyera::ScriptUIComponent::LABEL_MARGIN = 120.0f |
|
staticconstexprprivate |
The margin used for labeling elements in the UI.
The documentation for this class was generated from the following files: