Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
NodeGraphPanel.h
Go to the documentation of this file.
1/*
2 * Olympe Blueprint Editor - Node Graph Panel
3 *
4 * GUI panel for visual node graph editing using ImNodes
5 * Supports Behavior Trees and HFSM editing
6 */
7
8#pragma once
9
10#include <string>
11#include <vector>
12#include "NodeGraphManager.h"
13
14namespace Olympe
15{
16 /**
17 * NodeGraphPanel - ImGui/ImNodes panel for node graph editing
18 * Provides visual editor for behavior trees and state machines
19 */
21 {
22 public:
25
26 void Initialize();
27 void Shutdown();
28 void Render();
29
30
31 void RenderGraphTabs();
32 void RenderGraph();
33 void RenderContextMenu();
38
39 // Node creation helpers
40 void CreateNewNode(const char* nodeType, float x, float y);
41
42 // Helper for converting global UID to local node ID
44 {
45 return globalUID - (graphID * 10000); // 10000 is GRAPH_ID_MULTIPLIER
46 }
47
48 // ImNodes state
51 bool m_ShowContextMenu = false;
52 float m_ContextMenuPosX = 0.0f;
53 float m_ContextMenuPosY = 0.0f;
54
55 // Node editing modal
56 bool m_ShowNodeEditModal = false;
60
61 // For tracking node movement (undo/redo)
62 bool m_NodeDragStarted = false;
64 float m_DragStartX = 0.0f;
65 float m_DragStartY = 0.0f;
66 };
67}
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
NodeGraphPanel - ImGui/ImNodes panel for node graph editing Provides visual editor for behavior trees...
void CreateNewNode(const char *nodeType, float x, float y)
int GlobalUIDToLocalNodeID(int globalUID, int graphID) const
void HandleNodeInteractions(int graphID)