Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::ActionParametersPanel Class Reference

ImGui sub-panel for editing action node parameters. More...

#include <ActionParametersPanel.h>

Public Member Functions

 ActionParametersPanel ()
 
 ~ActionParametersPanel ()=default
 
 ActionParametersPanel (const ActionParametersPanel &)=delete
 
ActionParametersPaneloperator= (const ActionParametersPanel &)=delete
 
void SetActionTaskID (const std::string &taskID)
 Set the action task ID (e.g., "log_message", "patrol_path")
 
void SetNodeName (const std::string &name)
 Set the node name for display purposes.
 
void SetParameters (const std::unordered_map< std::string, std::string > &params)
 Set the parameters from a map of name->value pairs.
 
const std::vector< ActionParameter > & GetParameters () const
 Get all parameters with their current values.
 
std::string GetParameterValue (const std::string &paramName) const
 Get a specific parameter value by name.
 
bool IsDirty () const
 Check if any parameter has been modified.
 
void ClearDirty ()
 Clear the dirty flag after changes have been applied.
 
void Render ()
 

Private Member Functions

void RenderTitleSection ()
 
void RenderParametersSection ()
 
void RenderParameter (ActionParameter &param)
 

Private Attributes

std::string m_taskID
 
std::string m_nodeName
 
std::vector< ActionParameterm_parameters
 
bool m_dirty = false
 

Detailed Description

ImGui sub-panel for editing action node parameters.

Definition at line 37 of file ActionParametersPanel.h.

Constructor & Destructor Documentation

◆ ActionParametersPanel() [1/2]

Olympe::ActionParametersPanel::ActionParametersPanel ( )
explicit

Definition at line 13 of file ActionParametersPanel.cpp.

◆ ~ActionParametersPanel()

Olympe::ActionParametersPanel::~ActionParametersPanel ( )
default

◆ ActionParametersPanel() [2/2]

Olympe::ActionParametersPanel::ActionParametersPanel ( const ActionParametersPanel )
delete

Member Function Documentation

◆ ClearDirty()

void Olympe::ActionParametersPanel::ClearDirty ( )

Clear the dirty flag after changes have been applied.

Definition at line 90 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), m_dirty, and m_parameters.

+ Here is the call graph for this function:

◆ GetParameters()

const std::vector< ActionParameter > & Olympe::ActionParametersPanel::GetParameters ( ) const

Get all parameters with their current values.

Definition at line 62 of file ActionParametersPanel.cpp.

References m_parameters.

◆ GetParameterValue()

std::string Olympe::ActionParametersPanel::GetParameterValue ( const std::string &  paramName) const

Get a specific parameter value by name.

Definition at line 67 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), and m_parameters.

+ Here is the call graph for this function:

◆ IsDirty()

bool Olympe::ActionParametersPanel::IsDirty ( ) const

Check if any parameter has been modified.

Definition at line 77 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), m_dirty, and m_parameters.

+ Here is the call graph for this function:

◆ operator=()

ActionParametersPanel & Olympe::ActionParametersPanel::operator= ( const ActionParametersPanel )
delete

◆ Render()

void Olympe::ActionParametersPanel::Render ( )

Definition at line 99 of file ActionParametersPanel.cpp.

References m_parameters, m_taskID, RenderParametersSection(), and RenderTitleSection().

+ Here is the call graph for this function:

◆ RenderParameter()

void Olympe::ActionParametersPanel::RenderParameter ( ActionParameter param)
private

Definition at line 148 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), and m_dirty.

Referenced by RenderParametersSection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderParametersSection()

void Olympe::ActionParametersPanel::RenderParametersSection ( )
private

Definition at line 132 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), m_parameters, and RenderParameter().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderTitleSection()

void Olympe::ActionParametersPanel::RenderTitleSection ( )
private

Definition at line 122 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), m_nodeName, and m_taskID.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActionTaskID()

void Olympe::ActionParametersPanel::SetActionTaskID ( const std::string &  taskID)

Set the action task ID (e.g., "log_message", "patrol_path")

Definition at line 18 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), and m_taskID.

+ Here is the call graph for this function:

◆ SetNodeName()

void Olympe::ActionParametersPanel::SetNodeName ( const std::string &  name)

Set the node name for display purposes.

Definition at line 23 of file ActionParametersPanel.cpp.

References m_nodeName.

◆ SetParameters()

void Olympe::ActionParametersPanel::SetParameters ( const std::unordered_map< std::string, std::string > &  params)

Set the parameters from a map of name->value pairs.

Definition at line 28 of file ActionParametersPanel.cpp.

References GetComponentTypeID_Static(), m_dirty, m_parameters, and Olympe::ActionParameter::name.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_dirty

bool Olympe::ActionParametersPanel::m_dirty = false
private

Definition at line 100 of file ActionParametersPanel.h.

Referenced by ClearDirty(), IsDirty(), RenderParameter(), and SetParameters().

◆ m_nodeName

std::string Olympe::ActionParametersPanel::m_nodeName
private

Definition at line 98 of file ActionParametersPanel.h.

Referenced by RenderTitleSection(), and SetNodeName().

◆ m_parameters

std::vector<ActionParameter> Olympe::ActionParametersPanel::m_parameters
private

◆ m_taskID

std::string Olympe::ActionParametersPanel::m_taskID
private

Definition at line 97 of file ActionParametersPanel.h.

Referenced by Render(), RenderTitleSection(), and SetActionTaskID().


The documentation for this class was generated from the following files: