Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
BTNodePropertyPanel.h
Go to the documentation of this file.
1/**
2 * @file BTNodePropertyPanel.h
3 * @brief Property editor panel for BehaviorTree nodes
4 * @author Olympe Engine
5 * @date 2026-04-08
6 *
7 * @details
8 * Displays and allows editing of properties for the currently selected BT node.
9 * Supports string, int, and float parameter types.
10 * Mirrors EntityPrefab's PropertyEditorPanel pattern for consistency.
11 */
12
13#pragma once
14
15#include <string>
16#include <vector>
17
18namespace Olympe {
19
20// Forward declarations
21struct GraphNode;
23
24/**
25 * @class BTNodePropertyPanel
26 * @brief UI panel for editing BehaviorTree node properties
27 *
28 * Renders property controls for the currently selected node.
29 * Updates the BTNodeGraphManager when properties are changed.
30 */
32{
33public:
36
37 /**
38 * @brief Initialize the panel
39 */
40 void Initialize();
41
42 /**
43 * @brief Render the property panel
44 */
45 void Render();
46
47 /**
48 * @brief Set the currently selected node ID
49 * @param graphId Active graph ID in BTNodeGraphManager
50 * @param nodeId Local node ID within the graph
51 */
52 void SetSelectedNode(int graphId, int nodeId);
53
54 /**
55 * @brief Clear the current selection
56 */
57 void ClearSelection();
58
59 /**
60 * @brief Check if a node is currently selected
61 * @return true if a node is selected
62 */
63 bool HasSelectedNode() const { return m_selectedNodeId >= 0; }
64
65 // Public access to selected node ID for synchronization
67
68private:
69 int m_activeGraphId = -1; ///< Current graph ID in BTNodeGraphManager
70 char m_nodeNameBuffer[256] = {0}; ///< Buffer for node name editing
71 char m_paramBuffer[512] = {0}; ///< Buffer for parameter editing
72
73 // Rendering helpers
76 void RenderSubGraphControls(GraphNode* node); ///< Phase 39c: SubGraph node editor
77 void RenderSubGraphBindingEditor(GraphNode* node); ///< Phase 39c Step 4: Parameter binding editor
79};
80
81} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
UI panel for editing BehaviorTree node properties.
void Render()
Render the property panel.
void RenderNodeBasicInfo(const GraphNode *node)
void ClearSelection()
Clear the current selection.
bool HasSelectedNode() const
Check if a node is currently selected.
void ApplyNodeChanges(GraphNode *node)
void SetSelectedNode(int graphId, int nodeId)
Set the currently selected node ID.
void RenderSubGraphBindingEditor(GraphNode *node)
Phase 39c Step 4: Parameter binding editor.
char m_nodeNameBuffer[256]
Buffer for node name editing.
void RenderNodeParameters(const GraphNode *node)
void Initialize()
Initialize the panel.
char m_paramBuffer[512]
Buffer for parameter editing.
void RenderSubGraphControls(GraphNode *node)
Phase 39c: SubGraph node editor.
int m_activeGraphId
Current graph ID in BTNodeGraphManager.
< Provides AssetID and INVALID_ASSET_ID