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

ImGui sub-panel for managing the condition list of a single NodeBranch. More...

#include <NodeConditionsPanel.h>

+ Collaboration diagram for Olympe::NodeConditionsPanel:

Public Member Functions

 NodeConditionsPanel (ConditionPresetRegistry &registry)
 Constructs the panel bound to a global preset registry.
 
 ~NodeConditionsPanel ()=default
 
 NodeConditionsPanel (const NodeConditionsPanel &)=delete
 
NodeConditionsPaneloperator= (const NodeConditionsPanel &)=delete
 
void SetConditionRefs (const std::vector< NodeConditionRef > &refs)
 Replaces the panel's internal condition list.
 
const std::vector< NodeConditionRef > & GetConditionRefs () const
 Returns the current (possibly modified) condition list.
 
void SetConditionOperandRefs (const std::vector< ConditionRef > &refs)
 Replaces the panel's inline operand list (parallel to conditionRefs).
 
const std::vector< ConditionRef > & GetConditionOperandRefs () const
 Returns the current inline operand list.
 
void SetDynamicPins (const std::vector< DynamicDataPin > &pins)
 Provides the read-only list of dynamic pins for display.
 
bool IsDirty () const
 Returns true if the condition list has been modified since the last call to ClearDirty().
 
void ClearDirty ()
 Resets the dirty flag.
 
void SetNodeName (const std::string &name)
 Sets the node name displayed in the title section.
 
const std::string & GetNodeName () const
 Returns the current node name shown in the title bar.
 
bool IsEditModalRequested () const
 Returns true if the "Edit Conditions" button was clicked this frame.
 
void ClearEditModalRequest ()
 Resets the edit-modal request flag.
 
void Render ()
 Renders the condition list and dynamic-pin display using ImGui.
 
void RenderConditionList ()
 Renders all conditions inline as an editable list.
 
void RenderInlineConditionEditor ()
 Phase 24 UX Refactor: Renders condition editor inline (no modal popup).
 
void RenderInlineConditionRow (size_t index, const NodeConditionRef &ref)
 Renders a single condition row with edit/move/delete controls.
 
void RenderInlineAddCondition ()
 Renders the "Add Condition" button and preset picker inline.
 
void OnPresetDeleted (const std::string &deletedPresetID)
 Should be called by the host when a preset is deleted from the registry.
 
void SetLocalVariables (const std::vector< BlackboardEntry > &localVars)
 Sets the list of local variables from EntityBlackboard (Phase 24).
 
void AddCondition (const std::string &presetID)
 Appends a new condition reference with the given preset.
 
void RemoveCondition (size_t index)
 Removes the condition at the given index.
 
void SetLogicalOp (size_t index, LogicalOp op)
 Changes the logical operator for the condition at the given index.
 
size_t GetConditionCount () const
 Returns the number of conditions currently in the list.
 
bool IsValid () const
 Returns true when every condition ref points to an existing preset.
 
std::vector< std::string > Validate () const
 Returns a list of error strings describing validation failures.
 
void SetDropdownFilter (const std::string &filter)
 Sets the search/filter string used by the "Add Condition" dropdown.
 
const std::string & GetDropdownFilter () const
 Returns the current dropdown filter.
 
std::vector< ConditionPresetGetFilteredPresetsForDropdown () const
 Returns presets matching the current dropdown filter.
 

Public Attributes

std::function< void(const std::string &)> OnPresetChanged
 Fired when a preset is selected or changed.
 
std::function< void()> OnDynamicPinsNeedRegeneration
 Fired after the edit modal is confirmed and condition refs are updated, signalling that dynamic pins must be regenerated.
 

Private Member Functions

void RenderTitleSection ()
 Section 1: title bar (blue background, node name).
 
void RenderExecPinsSection ()
 Section 2: static exec pins (In / Then / Else, never editable).
 
void RenderConditionsPreview ()
 Section 3: read-only conditions preview (green text) + "Edit Conditions" button.
 
void RenderDynamicPinsSection ()
 Section 4: dynamic data pins (yellow, only when non-empty).
 
void RenderOperandDropdown (ConditionRef &cref, bool isLeft, const std::string &pinLabel="")
 Renders the operand mode selector + value field for one operand.
 
void RenderOperatorDropdown (ConditionRef &cref)
 Renders the operator combo box (==, !=, <, <=, >, >=).
 
void NormalizeLogicalOps ()
 Fixes up the first condition's logicalOp to always be Start.
 

Private Attributes

ConditionPresetRegistrym_registry
 Shared global registry.
 
std::vector< NodeConditionRefm_conditionRefs
 Current node's conditions.
 
std::vector< ConditionRefm_conditionOperandRefs
 Inline operand data (parallel to m_conditionRefs)
 
std::vector< DynamicDataPinm_dynamicPins
 Read-only dynamic pins for display.
 
std::vector< BlackboardEntrym_localVariables
 Local variables from entity (Phase 24)
 
std::string m_nodeName
 Node display name for title section.
 
bool m_dirty = false
 Modification flag.
 
bool m_editModalRequested = false
 Set when Edit button is clicked.
 
bool m_pickerOpen = false
 Phase 24: Inline preset picker visibility.
 
NodeConditionsEditModal m_editModal
 Owned modal for condition editing.
 
std::string m_dropdownFilter
 Filter text for "Add Condition" dropdown.
 
bool m_dropdownOpen = false
 Whether the add-dropdown is shown (legacy, kept for API compat)
 

Detailed Description

ImGui sub-panel for managing the condition list of a single NodeBranch.

The panel does NOT own the registry — it holds a reference. The caller is responsible for persisting changes from GetConditionRefs() back to the node definition.

Dependency injection: NodeConditionsPanel panel(registry); panel.SetConditionRefs(node.conditions); panel.SetDynamicPins(node.dynamicPins); // optional read-only display panel.Render(); if (panel.IsDirty()) { node.conditions = panel.GetConditionRefs(); panel.ClearDirty(); }

Definition at line 73 of file NodeConditionsPanel.h.

Constructor & Destructor Documentation

◆ NodeConditionsPanel() [1/2]

Olympe::NodeConditionsPanel::NodeConditionsPanel ( ConditionPresetRegistry registry)
explicit

Constructs the panel bound to a global preset registry.

Parameters
registryGlobal ConditionPresetRegistry (must outlive this panel).

Definition at line 28 of file NodeConditionsPanel.cpp.

◆ ~NodeConditionsPanel()

Olympe::NodeConditionsPanel::~NodeConditionsPanel ( )
default

◆ NodeConditionsPanel() [2/2]

Olympe::NodeConditionsPanel::NodeConditionsPanel ( const NodeConditionsPanel )
delete

Member Function Documentation

◆ AddCondition()

void Olympe::NodeConditionsPanel::AddCondition ( const std::string &  presetID)

Appends a new condition reference with the given preset.

The logicalOp is automatically set to LogicalOp::And (except for the first entry, which receives LogicalOp::Start).

Parameters
presetIDUUID of the ConditionPreset to reference.

Definition at line 79 of file NodeConditionsPanel.cpp.

References Olympe::And, Olympe::ConditionRef::conditionIndex, Olympe::OperandRef::Const, Olympe::Const, Olympe::Equal, GetComponentTypeID_Static(), Olympe::ConditionPresetRegistry::GetPreset(), Olympe::Greater, Olympe::GreaterEqual, Olympe::ConditionPreset::left, Olympe::Less, Olympe::LessEqual, m_conditionOperandRefs, m_conditionRefs, m_dirty, m_registry, NormalizeLogicalOps(), Olympe::NotEqual, OnPresetChanged, Olympe::OperandRef::Pin, Olympe::Pin, Olympe::Start, Olympe::Operand::stringValue, Olympe::OperandRef::Variable, and Olympe::Variable.

Referenced by RenderConditionList().

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

◆ ClearDirty()

void Olympe::NodeConditionsPanel::ClearDirty ( )
inline

Resets the dirty flag.

Definition at line 144 of file NodeConditionsPanel.h.

References m_dirty.

◆ ClearEditModalRequest()

void Olympe::NodeConditionsPanel::ClearEditModalRequest ( )
inline

Resets the edit-modal request flag.

Definition at line 176 of file NodeConditionsPanel.h.

References m_editModalRequested.

◆ GetConditionCount()

size_t Olympe::NodeConditionsPanel::GetConditionCount ( ) const

Returns the number of conditions currently in the list.

Definition at line 185 of file NodeConditionsPanel.cpp.

References m_conditionRefs.

◆ GetConditionOperandRefs()

const std::vector< ConditionRef > & Olympe::NodeConditionsPanel::GetConditionOperandRefs ( ) const

Returns the current inline operand list.

The host should read this after IsDirty() returns true and persist it to node.conditionOperandRefs.

Definition at line 65 of file NodeConditionsPanel.cpp.

References m_conditionOperandRefs.

◆ GetConditionRefs()

const std::vector< NodeConditionRef > & Olympe::NodeConditionsPanel::GetConditionRefs ( ) const

Returns the current (possibly modified) condition list.

Definition at line 55 of file NodeConditionsPanel.cpp.

References m_conditionRefs.

◆ GetDropdownFilter()

const std::string & Olympe::NodeConditionsPanel::GetDropdownFilter ( ) const
inline

Returns the current dropdown filter.

Definition at line 354 of file NodeConditionsPanel.h.

References m_dropdownFilter.

◆ GetFilteredPresetsForDropdown()

std::vector< ConditionPreset > Olympe::NodeConditionsPanel::GetFilteredPresetsForDropdown ( ) const

Returns presets matching the current dropdown filter.

Delegates to ConditionPresetRegistry::FindPresetsByName when the filter is non-empty; returns all presets otherwise.

Definition at line 265 of file NodeConditionsPanel.cpp.

References Olympe::ConditionPresetRegistry::FindPresetsByName(), Olympe::ConditionPresetRegistry::GetAllPresetIDs(), GetComponentTypeID_Static(), Olympe::ConditionPresetRegistry::GetPreset(), m_dropdownFilter, and m_registry.

Referenced by RenderConditionList().

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

◆ GetNodeName()

const std::string & Olympe::NodeConditionsPanel::GetNodeName ( ) const
inline

Returns the current node name shown in the title bar.

Definition at line 159 of file NodeConditionsPanel.h.

References m_nodeName.

◆ IsDirty()

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

Returns true if the condition list has been modified since the last call to ClearDirty().

Definition at line 139 of file NodeConditionsPanel.h.

References m_dirty.

◆ IsEditModalRequested()

bool Olympe::NodeConditionsPanel::IsEditModalRequested ( ) const
inline

Returns true if the "Edit Conditions" button was clicked this frame.

The caller should open NodeConditionsEditModal when this is true, then call ClearEditModalRequest() to reset the flag.

Definition at line 171 of file NodeConditionsPanel.h.

References m_editModalRequested.

◆ IsValid()

bool Olympe::NodeConditionsPanel::IsValid ( ) const

Returns true when every condition ref points to an existing preset.

Definition at line 222 of file NodeConditionsPanel.cpp.

References Validate().

+ Here is the call graph for this function:

◆ NormalizeLogicalOps()

void Olympe::NodeConditionsPanel::NormalizeLogicalOps ( )
private

Fixes up the first condition's logicalOp to always be Start.

Definition at line 1032 of file NodeConditionsPanel.cpp.

References m_conditionRefs, and Olympe::Start.

Referenced by AddCondition(), OnPresetDeleted(), RemoveCondition(), and SetConditionRefs().

+ Here is the caller graph for this function:

◆ OnPresetDeleted()

void Olympe::NodeConditionsPanel::OnPresetDeleted ( const std::string &  deletedPresetID)

Should be called by the host when a preset is deleted from the registry.

Removes any NodeConditionRef pointing to that preset.

Parameters
deletedPresetIDUUID of the preset that was removed.

Definition at line 194 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionRefs, m_dirty, and NormalizeLogicalOps().

+ Here is the call graph for this function:

◆ operator=()

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

◆ RemoveCondition()

void Olympe::NodeConditionsPanel::RemoveCondition ( size_t  index)

Removes the condition at the given index.

Parameters
indexZero-based index in the condition list.

Definition at line 154 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionOperandRefs, m_conditionRefs, m_dirty, and NormalizeLogicalOps().

Referenced by RenderConditionList().

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

◆ Render()

void Olympe::NodeConditionsPanel::Render ( )

Renders the condition list and dynamic-pin display using ImGui.

Must be called once per frame inside an ImGui window context. Internally wrapped in #ifndef OLYMPE_HEADLESS so tests can call the logic methods without linking ImGui.

Definition at line 295 of file NodeConditionsPanel.cpp.

References RenderInlineConditionEditor().

+ Here is the call graph for this function:

◆ RenderConditionList()

void Olympe::NodeConditionsPanel::RenderConditionList ( )

Renders all conditions inline as an editable list.

Each condition is displayed as a row containing:

  • Condition preview (green text, from ConditionPreset::GetPreview)
  • Logical-operator dropdown ("And" / "Or") — skipped for the first row
  • Delete button ("X") that removes the condition immediately

Below the list a "[+ Add Condition]" button opens a popup that lets the user pick a preset from the registry (filtered by name).

Modifications set the dirty flag so the host can sync via GetConditionRefs().

Layout:

┌─ "Structured Conditions (evaluated with implicit AND)" ──┐
[mHealth] <= [2] [And▼] [X]
[mSpeed] <= [100.00] [Or▼] [X]
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Describes a single condition expression for Branch/While nodes.

Guarded by #ifndef OLYMPE_HEADLESS — no-op in headless test builds.

< Width of the And/Or combo

< Width of the [X] delete button

< Max filter string length incl. NUL

Definition at line 607 of file NodeConditionsPanel.cpp.

References AddCondition(), Olympe::And, Olympe::ConditionRef::conditionIndex, GetComponentTypeID_Static(), GetFilteredPresetsForDropdown(), Olympe::Left, m_conditionOperandRefs, m_conditionRefs, m_dirty, m_dropdownFilter, m_dynamicPins, OnDynamicPinsNeedRegeneration, Olympe::Or, RemoveCondition(), RenderOperandDropdown(), RenderOperatorDropdown(), and SetDropdownFilter().

+ Here is the call graph for this function:

◆ RenderConditionsPreview()

void Olympe::NodeConditionsPanel::RenderConditionsPreview ( )
private

◆ RenderDynamicPinsSection()

void Olympe::NodeConditionsPanel::RenderDynamicPinsSection ( )
private

Section 4: dynamic data pins (yellow, only when non-empty).

Definition at line 762 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_dynamicPins.

+ Here is the call graph for this function:

◆ RenderExecPinsSection()

void Olympe::NodeConditionsPanel::RenderExecPinsSection ( )
private

Section 2: static exec pins (In / Then / Else, never editable).

Definition at line 490 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ RenderInlineAddCondition()

void Olympe::NodeConditionsPanel::RenderInlineAddCondition ( )

Renders the "Add Condition" button and preset picker inline.

When clicked, shows a filterable list of available presets from the registry.

Definition at line 427 of file NodeConditionsPanel.cpp.

References Olympe::And, GetComponentTypeID_Static(), Olympe::ConditionPresetRegistry::GetFilteredPresets(), m_conditionRefs, m_dirty, m_pickerOpen, m_registry, OnDynamicPinsNeedRegeneration, and Olympe::Start.

Referenced by RenderInlineConditionEditor().

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

◆ RenderInlineConditionEditor()

void Olympe::NodeConditionsPanel::RenderInlineConditionEditor ( )

Phase 24 UX Refactor: Renders condition editor inline (no modal popup).

Replaces the modal-based editing with an inline collapsible section that allows users to add, edit, reorder, and delete conditions directly in the properties panel without opening a separate modal window.

Guarded by #ifndef OLYMPE_HEADLESS.

Definition at line 308 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionRefs, RenderInlineAddCondition(), and RenderInlineConditionRow().

Referenced by Render().

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

◆ RenderInlineConditionRow()

void Olympe::NodeConditionsPanel::RenderInlineConditionRow ( size_t  index,
const NodeConditionRef ref 
)

Renders a single condition row with edit/move/delete controls.

Parameters
indexIndex of the condition in m_conditionRefs
refReference to the NodeConditionRef being rendered

Definition at line 345 of file NodeConditionsPanel.cpp.

References Olympe::And, GetComponentTypeID_Static(), Olympe::ConditionPresetRegistry::GetPreset(), m_conditionOperandRefs, m_conditionRefs, m_dirty, m_registry, OnDynamicPinsNeedRegeneration, Olympe::Or, and SetLogicalOp().

Referenced by RenderInlineConditionEditor().

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

◆ RenderOperandDropdown()

void Olympe::NodeConditionsPanel::RenderOperandDropdown ( ConditionRef cref,
bool  isLeft,
const std::string &  pinLabel = "" 
)
private

Renders the operand mode selector + value field for one operand.

Inline widget used inside RenderConditionList() for each condition row. Renders a three-button radio group (Variable | Const | Pin) followed by a mode-specific input:

  • Variable: text field for the blackboard key (e.g. "mHealth")
  • Const: numeric text field (e.g. "100.0")
  • Pin: read-only label "Pin-in #N" (auto-assigned)
Parameters
crefConditionRef to modify (mode and value fields).
isLeftTrue for the left operand, false for the right operand.
pinLabelShort "Pin-in #N" label for Pin-mode display (may be empty).

Definition at line 781 of file NodeConditionsPanel.cpp.

References Olympe::OperandRef::Const, Olympe::OperandRef::constValue, Olympe::OperandRef::dynamicPinID, Olympe::GlobalTemplateBlackboard::Get(), GetComponentTypeID_Static(), Olympe::Left, m_dirty, m_dynamicPins, m_localVariables, Olympe::OperandRef::mode, OnDynamicPinsNeedRegeneration, Olympe::OperandRef::Pin, Olympe::Right, Olympe::OperandRef::Variable, and Olympe::OperandRef::variableName.

Referenced by RenderConditionList().

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

◆ RenderOperatorDropdown()

void Olympe::NodeConditionsPanel::RenderOperatorDropdown ( ConditionRef cref)
private

Renders the operator combo box (==, !=, <, <=, >, >=).

Inline widget used inside RenderConditionList() for each condition row. Updates cref.operatorStr on selection.

Parameters
crefConditionRef to modify.

Definition at line 995 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_dirty.

Referenced by RenderConditionList().

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

◆ RenderTitleSection()

void Olympe::NodeConditionsPanel::RenderTitleSection ( )
private

Section 1: title bar (blue background, node name).

Definition at line 476 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_nodeName.

+ Here is the call graph for this function:

◆ SetConditionOperandRefs()

void Olympe::NodeConditionsPanel::SetConditionOperandRefs ( const std::vector< ConditionRef > &  refs)

Replaces the panel's inline operand list (parallel to conditionRefs).

Each entry corresponds 1:1 with a NodeConditionRef and stores the editable operand data (mode, variable name, const value, dynamicPinID). Typically called alongside SetConditionRefs() when a node is selected.

Parameters
refsInline operand refs from node.conditionOperandRefs.

Definition at line 60 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_conditionOperandRefs.

+ Here is the call graph for this function:

◆ SetConditionRefs()

void Olympe::NodeConditionsPanel::SetConditionRefs ( const std::vector< NodeConditionRef > &  refs)

Replaces the panel's internal condition list.

Typically called when a new node is selected in the editor.

Parameters
refsCondition references from node.conditions.

Definition at line 38 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionOperandRefs, m_conditionRefs, m_dirty, and NormalizeLogicalOps().

+ Here is the call graph for this function:

◆ SetDropdownFilter()

void Olympe::NodeConditionsPanel::SetDropdownFilter ( const std::string &  filter)

Sets the search/filter string used by the "Add Condition" dropdown.

Parameters
filterSubstring filter (empty = show all).

Definition at line 259 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_dropdownFilter.

Referenced by RenderConditionList().

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

◆ SetDynamicPins()

void Olympe::NodeConditionsPanel::SetDynamicPins ( const std::vector< DynamicDataPin > &  pins)

Provides the read-only list of dynamic pins for display.

The panel shows these pins in a read-only section. Ownership stays with the DynamicDataPinManager; the panel only renders them.

Parameters
pinsCurrent dynamic pins associated with this node.

Definition at line 70 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), and m_dynamicPins.

+ Here is the call graph for this function:

◆ SetLocalVariables()

void Olympe::NodeConditionsPanel::SetLocalVariables ( const std::vector< BlackboardEntry > &  localVars)
inline

Sets the list of local variables from EntityBlackboard (Phase 24).

Used to populate variable dropdowns in the operand selector with both local and global variables.

Parameters
localVarsVector of local variable definitions from the entity blackboard.

Definition at line 284 of file NodeConditionsPanel.h.

References GetComponentTypeID_Static(), and m_localVariables.

+ Here is the call graph for this function:

◆ SetLogicalOp()

void Olympe::NodeConditionsPanel::SetLogicalOp ( size_t  index,
LogicalOp  op 
)

Changes the logical operator for the condition at the given index.

Index 0 is always forced to LogicalOp::Start regardless of the value passed in.

Parameters
indexZero-based index.
opNew LogicalOp (And or Or; Start is ignored for index > 0).

Definition at line 175 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionRefs, m_dirty, and Olympe::Start.

Referenced by RenderInlineConditionRow().

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

◆ SetNodeName()

void Olympe::NodeConditionsPanel::SetNodeName ( const std::string &  name)
inline

Sets the node name displayed in the title section.

Parameters
nameDisplay name (e.g. "Is Health Critical?").

Definition at line 154 of file NodeConditionsPanel.h.

References m_nodeName.

◆ Validate()

std::vector< std::string > Olympe::NodeConditionsPanel::Validate ( ) const

Returns a list of error strings describing validation failures.

Empty if IsValid() returns true.

Definition at line 227 of file NodeConditionsPanel.cpp.

References GetComponentTypeID_Static(), m_conditionRefs, m_registry, Olympe::NodeConditionRef::presetID, and Olympe::ConditionPresetRegistry::ValidatePresetID().

Referenced by IsValid().

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

Member Data Documentation

◆ m_conditionOperandRefs

std::vector<ConditionRef> Olympe::NodeConditionsPanel::m_conditionOperandRefs
private

◆ m_conditionRefs

std::vector<NodeConditionRef> Olympe::NodeConditionsPanel::m_conditionRefs
private

◆ m_dirty

bool Olympe::NodeConditionsPanel::m_dirty = false
private

◆ m_dropdownFilter

std::string Olympe::NodeConditionsPanel::m_dropdownFilter
private

Filter text for "Add Condition" dropdown.

Definition at line 432 of file NodeConditionsPanel.h.

Referenced by GetDropdownFilter(), GetFilteredPresetsForDropdown(), RenderConditionList(), and SetDropdownFilter().

◆ m_dropdownOpen

bool Olympe::NodeConditionsPanel::m_dropdownOpen = false
private

Whether the add-dropdown is shown (legacy, kept for API compat)

Definition at line 433 of file NodeConditionsPanel.h.

◆ m_dynamicPins

std::vector<DynamicDataPin> Olympe::NodeConditionsPanel::m_dynamicPins
private

Read-only dynamic pins for display.

Definition at line 423 of file NodeConditionsPanel.h.

Referenced by RenderConditionList(), RenderDynamicPinsSection(), RenderOperandDropdown(), and SetDynamicPins().

◆ m_editModal

NodeConditionsEditModal Olympe::NodeConditionsPanel::m_editModal
private

Owned modal for condition editing.

Definition at line 430 of file NodeConditionsPanel.h.

Referenced by RenderConditionsPreview().

◆ m_editModalRequested

bool Olympe::NodeConditionsPanel::m_editModalRequested = false
private

Set when Edit button is clicked.

Definition at line 427 of file NodeConditionsPanel.h.

Referenced by ClearEditModalRequest(), IsEditModalRequested(), and RenderConditionsPreview().

◆ m_localVariables

std::vector<BlackboardEntry> Olympe::NodeConditionsPanel::m_localVariables
private

Local variables from entity (Phase 24)

Definition at line 424 of file NodeConditionsPanel.h.

Referenced by RenderOperandDropdown(), and SetLocalVariables().

◆ m_nodeName

std::string Olympe::NodeConditionsPanel::m_nodeName
private

Node display name for title section.

Definition at line 425 of file NodeConditionsPanel.h.

Referenced by GetNodeName(), RenderTitleSection(), and SetNodeName().

◆ m_pickerOpen

bool Olympe::NodeConditionsPanel::m_pickerOpen = false
private

Phase 24: Inline preset picker visibility.

Definition at line 428 of file NodeConditionsPanel.h.

Referenced by RenderInlineAddCondition().

◆ m_registry

ConditionPresetRegistry& Olympe::NodeConditionsPanel::m_registry
private

◆ OnDynamicPinsNeedRegeneration

std::function<void()> Olympe::NodeConditionsPanel::OnDynamicPinsNeedRegeneration

Fired after the edit modal is confirmed and condition refs are updated, signalling that dynamic pins must be regenerated.

The host should connect this to DynamicDataPinManager::RegeneratePinsFromConditions() or NodeBranchRenderer::TriggerPinRegeneration() so that the canvas updates immediately on the next render frame.

Example:

panel.OnDynamicPinsNeedRegeneration = [&]() {
pinManager.RegeneratePinsFromConditions(node.conditionRefs);
node.dynamicPins = pinManager.GetAllPins();
};

Definition at line 266 of file NodeConditionsPanel.h.

Referenced by RenderConditionList(), RenderInlineAddCondition(), RenderInlineConditionRow(), and RenderOperandDropdown().

◆ OnPresetChanged

std::function<void(const std::string&)> Olympe::NodeConditionsPanel::OnPresetChanged

Fired when a preset is selected or changed.

Arg: preset ID.

Definition at line 248 of file NodeConditionsPanel.h.

Referenced by AddCondition().


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