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::VariablePropertyPanel Class Reference

ImGui sub-panel for editing Variable node's blackboard variable selection. More...

#include <VariablePropertyPanel.h>

+ Collaboration diagram for Olympe::VariablePropertyPanel:

Public Member Functions

 VariablePropertyPanel ()
 Constructs the panel.
 
 ~VariablePropertyPanel ()=default
 
 VariablePropertyPanel (const VariablePropertyPanel &)=delete
 
VariablePropertyPaneloperator= (const VariablePropertyPanel &)=delete
 
void SetNodeName (const std::string &name)
 Sets the node name displayed in the title section.
 
void SetTemplate (const TaskGraphTemplate *tmpl)
 Sets the template reference for blackboard variable lookup.
 
void SetBBKey (const std::string &key)
 Sets the currently selected BB key.
 
const std::string & GetBBKey () const
 Returns the current (possibly modified) BB key.
 
bool IsDirty () const
 Returns true if the BB key has been modified since the last call to ClearDirty().
 
void ClearDirty ()
 Resets the dirty flag.
 
void Render ()
 Renders the panel into the current ImGui context.
 

Private Member Functions

void RebuildVariableList ()
 Rebuilds the list of available blackboard variables.
 

Private Attributes

std::string m_nodeName
 
std::string m_selectedBBKey
 
const TaskGraphTemplatem_template
 
bool m_dirty
 
std::vector< std::string > m_availableVariables
 

Detailed Description

ImGui sub-panel for editing Variable node's blackboard variable selection.

Identical to GetBBValuePropertyPanel - provides variable dropdown selector.

Definition at line 32 of file VariablePropertyPanel.h.

Constructor & Destructor Documentation

◆ VariablePropertyPanel() [1/2]

Olympe::VariablePropertyPanel::VariablePropertyPanel ( )
explicit

Constructs the panel.

Definition at line 18 of file VariablePropertyPanel.cpp.

◆ ~VariablePropertyPanel()

Olympe::VariablePropertyPanel::~VariablePropertyPanel ( )
default

◆ VariablePropertyPanel() [2/2]

Olympe::VariablePropertyPanel::VariablePropertyPanel ( const VariablePropertyPanel )
delete

Member Function Documentation

◆ ClearDirty()

void Olympe::VariablePropertyPanel::ClearDirty ( )
inline

Resets the dirty flag.

Definition at line 79 of file VariablePropertyPanel.h.

References m_dirty.

◆ GetBBKey()

const std::string & Olympe::VariablePropertyPanel::GetBBKey ( ) const

Returns the current (possibly modified) BB key.

Definition at line 44 of file VariablePropertyPanel.cpp.

References m_selectedBBKey.

◆ IsDirty()

bool Olympe::VariablePropertyPanel::IsDirty ( ) const
inline

Returns true if the BB key has been modified since the last call to ClearDirty().

Definition at line 74 of file VariablePropertyPanel.h.

References m_dirty.

◆ operator=()

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

◆ RebuildVariableList()

void Olympe::VariablePropertyPanel::RebuildVariableList ( )
private

Rebuilds the list of available blackboard variables.

Definition at line 49 of file VariablePropertyPanel.cpp.

References Olympe::TaskGraphTemplate::Blackboard, GetComponentTypeID_Static(), m_availableVariables, and m_template.

Referenced by SetTemplate().

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

◆ Render()

void Olympe::VariablePropertyPanel::Render ( )

Renders the panel into the current ImGui context.

Definition at line 63 of file VariablePropertyPanel.cpp.

References Olympe::TaskGraphTemplate::Blackboard, Olympe::Bool, Olympe::EntityID, Olympe::Float, GetComponentTypeID_Static(), Olympe::Int, m_availableVariables, m_nodeName, m_selectedBBKey, m_template, SetBBKey(), Olympe::String, and Olympe::Vector.

+ Here is the call graph for this function:

◆ SetBBKey()

void Olympe::VariablePropertyPanel::SetBBKey ( const std::string &  key)

Sets the currently selected BB key.

Definition at line 35 of file VariablePropertyPanel.cpp.

References GetComponentTypeID_Static(), m_dirty, and m_selectedBBKey.

Referenced by Render().

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

◆ SetNodeName()

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

Sets the node name displayed in the title section.

Definition at line 24 of file VariablePropertyPanel.cpp.

References m_nodeName.

◆ SetTemplate()

void Olympe::VariablePropertyPanel::SetTemplate ( const TaskGraphTemplate tmpl)

Sets the template reference for blackboard variable lookup.

Definition at line 29 of file VariablePropertyPanel.cpp.

References GetComponentTypeID_Static(), m_template, and RebuildVariableList().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_availableVariables

std::vector<std::string> Olympe::VariablePropertyPanel::m_availableVariables
private

Definition at line 100 of file VariablePropertyPanel.h.

Referenced by RebuildVariableList(), and Render().

◆ m_dirty

bool Olympe::VariablePropertyPanel::m_dirty
private

Definition at line 99 of file VariablePropertyPanel.h.

Referenced by ClearDirty(), IsDirty(), and SetBBKey().

◆ m_nodeName

std::string Olympe::VariablePropertyPanel::m_nodeName
private

Definition at line 96 of file VariablePropertyPanel.h.

Referenced by Render(), and SetNodeName().

◆ m_selectedBBKey

std::string Olympe::VariablePropertyPanel::m_selectedBBKey
private

Definition at line 97 of file VariablePropertyPanel.h.

Referenced by GetBBKey(), Render(), and SetBBKey().

◆ m_template

const TaskGraphTemplate* Olympe::VariablePropertyPanel::m_template
private

Definition at line 98 of file VariablePropertyPanel.h.

Referenced by RebuildVariableList(), Render(), and SetTemplate().


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