Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
AIEditorPanels.cpp
Go to the documentation of this file.
1/**
2 * @file AIEditorPanels.cpp
3 * @brief Implementation of specialized AI Editor panels
4 * @author Olympe Engine
5 * @date 2026-02-18
6 */
7
8#include "AIEditorPanels.h"
9#include "../../third_party/imgui/imgui.h"
10#include "../../system/system_utils.h"
11#include <cstring>
12
13namespace Olympe {
14namespace AI {
15
16// ============================================================================
17// BlackboardInspectorPanel
18// ============================================================================
19
21 : m_showAddDialog(false)
22{
23 std::memset(m_newVarName, 0, sizeof(m_newVarName));
24}
25
27{
28 if (activeGraph == nullptr) {
29 ImGui::Text("No active graph");
30 return;
31 }
32
33 ImGui::Text("Blackboard Variables");
34 ImGui::Separator();
35
36 if (ImGui::Button("Add Variable")) {
37 m_showAddDialog = true;
38 }
39
40 ImGui::Separator();
41
43
44 if (m_showAddDialog) {
46 }
47}
48
50{
51 // TODO: Implement blackboard variable list from graph metadata
52 ImGui::Text("(Variable list not yet implemented)");
53 (void)doc;
54}
55
57{
58 ImGui::OpenPopup("Add Blackboard Variable");
59
60 if (ImGui::BeginPopupModal("Add Blackboard Variable", &m_showAddDialog)) {
61 ImGui::InputText("Name", m_newVarName, sizeof(m_newVarName));
62
63 if (ImGui::Button("Add")) {
64 SYSTEM_LOG << "[BlackboardPanel] Add variable: " << m_newVarName << std::endl;
65 m_showAddDialog = false;
66 }
67
68 ImGui::SameLine();
69
70 if (ImGui::Button("Cancel")) {
71 m_showAddDialog = false;
72 }
73
74 ImGui::EndPopup();
75 }
76}
77
79{
80 ImGui::Text("Editing: %s", varName.c_str());
81 // TODO: Implement variable editor
82}
83
84// ============================================================================
85// SensesDebugPanel
86// ============================================================================
87
91
93{
94 ImGui::Text("AI Senses Debug");
95 ImGui::Separator();
96
98}
99
101{
102 ImGui::Text("Entities with AI Senses:");
103 ImGui::Separator();
104
105 // TODO: List entities with AIComponent
106 ImGui::Text("(Entity list not yet implemented)");
107}
108
110{
111 // TODO: Show sense details for selected entity
112}
113
115{
116 // TODO: Visualize vision cone
117}
118
120{
121 // TODO: Show detected targets
122}
123
124// ============================================================================
125// RuntimeDebugPanel
126// ============================================================================
127
129 : m_selectedEntity(-1)
130{
131}
132
134{
135 ImGui::Text("Runtime Debug");
136 ImGui::Separator();
137
138 // Split panel
139 ImGui::BeginChild("EntityList", ImVec2(200, 0), true);
141 ImGui::EndChild();
142
143 ImGui::SameLine();
144
145 ImGui::BeginChild("ExecutionView", ImVec2(0, 0), true);
146 if (m_selectedEntity >= 0) {
148 ImGui::Separator();
150 ImGui::Separator();
152 } else {
153 ImGui::Text("Select an entity to view execution");
154 }
155 ImGui::EndChild();
156}
157
159{
160 ImGui::Text("Entities with BT:");
161 ImGui::Separator();
162
163 // TODO: List entities with BehaviorTreeRuntime component
164 ImGui::Text("(Entity list not yet implemented)");
165}
166
168{
169 ImGui::Text("Execution Graph");
170 // TODO: Show graph with executing nodes highlighted
171}
172
174{
175 ImGui::Text("Execution Log");
176 // TODO: Show execution log entries
177}
178
180{
181 ImGui::Text("Blackboard Values");
182 // TODO: Show current blackboard values
183}
184
185} // namespace AI
186} // namespace Olympe
Specialized panels for AI Editor.
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
void RenderVariableList(NodeGraph::GraphDocument *doc)
void RenderVariableEditor(const std::string &varName)
void Render(NodeGraph::GraphDocument *activeGraph)
Render the panel.
void Render()
Render the panel.
void Render()
Render the panel.
Main document class for a node graph.
< Provides AssetID and INVALID_ASSET_ID
#define SYSTEM_LOG