![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
NodeGraphPanel - ImGui/ImNodes panel for node graph editing Provides visual editor for behavior trees and state machines. More...
#include <NodeGraphPanel.h>
Collaboration diagram for Olympe::NodeGraphPanel:Public Member Functions | |
| NodeGraphPanel () | |
| ~NodeGraphPanel () | |
| void | Initialize () |
| void | Shutdown () |
| void | Render () |
| void | RenderGraphTabs () |
| void | RenderGraph () |
| void | RenderContextMenu () |
| void | RenderNodeProperties () |
| void | RenderNodeEditModal () |
| void | HandleKeyboardShortcuts () |
| void | HandleNodeInteractions (int graphID) |
| void | CreateNewNode (const char *nodeType, float x, float y) |
| int | GlobalUIDToLocalNodeID (int globalUID, int graphID) const |
Public Attributes | |
| int | m_SelectedNodeId = -1 |
| int | m_SelectedLinkId = -1 |
| bool | m_ShowContextMenu = false |
| float | m_ContextMenuPosX = 0.0f |
| float | m_ContextMenuPosY = 0.0f |
| bool | m_ShowNodeEditModal = false |
| GraphNode * | m_EditingNode = nullptr |
| int | m_EditingNodeId = -1 |
| char | m_NodeNameBuffer [256] |
| bool | m_NodeDragStarted = false |
| int | m_DraggedNodeId = -1 |
| float | m_DragStartX = 0.0f |
| float | m_DragStartY = 0.0f |
NodeGraphPanel - ImGui/ImNodes panel for node graph editing Provides visual editor for behavior trees and state machines.
Definition at line 20 of file NodeGraphPanel.h.
| Olympe::NodeGraphPanel::NodeGraphPanel | ( | ) |
Definition at line 46 of file NodeGraphPanel.cpp.
| Olympe::NodeGraphPanel::~NodeGraphPanel | ( | ) |
Definition at line 50 of file NodeGraphPanel.cpp.
Definition at line 948 of file NodeGraphPanel.cpp.
References Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraph(), GetComponentTypeID_Static(), and Olympe::StringToNodeType().
Referenced by RenderContextMenu().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 43 of file NodeGraphPanel.h.
References GetComponentTypeID_Static().
Referenced by HandleNodeInteractions(), and RenderGraph().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::HandleKeyboardShortcuts | ( | ) |
Definition at line 982 of file NodeGraphPanel.cpp.
References Olympe::CommandStack::ExecuteCommand(), Olympe::BlueprintEditor::Get(), Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraph(), Olympe::BlueprintEditor::GetCommandStack(), GetComponentTypeID_Static(), Olympe::BlueprintEditor::Redo(), and Olympe::BlueprintEditor::Undo().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 819 of file NodeGraphPanel.cpp.
References Olympe::CommandStack::ExecuteCommand(), Olympe::BlueprintEditor::Get(), Olympe::EditorContext::Get(), Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraph(), Olympe::BlueprintEditor::GetCommandStack(), GetComponentTypeID_Static(), GlobalUIDToLocalNodeID(), and m_SelectedNodeId.
Referenced by RenderGraph().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::Initialize | ( | ) |
Definition at line 54 of file NodeGraphPanel.cpp.
Referenced by Olympe::BlueprintEditorGUI::Initialize().
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::Render | ( | ) |
Definition at line 64 of file NodeGraphPanel.cpp.
References Olympe::NodeGraphManager::CreateGraph(), Olympe::BlueprintEditor::Get(), Olympe::EntityInspectorManager::Get(), Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraph(), Olympe::NodeGraphManager::GetActiveGraphId(), GetComponentTypeID_Static(), Olympe::EntityInspectorManager::GetEntityInfo(), Olympe::BlueprintEditor::GetSelectedEntity(), HandleKeyboardShortcuts(), Olympe::NodeGraph::HasFilepath(), RenderGraph(), RenderGraphTabs(), and RenderNodeEditModal().
Referenced by Olympe::BlueprintEditorGUI::Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::RenderContextMenu | ( | ) |
Definition at line 859 of file NodeGraphPanel.cpp.
References CreateNewNode(), Olympe::EnumCatalogManager::Get(), Olympe::NodeGraphManager::Get(), Olympe::EnumCatalogManager::GetActionTypes(), Olympe::NodeGraphManager::GetActiveGraph(), Olympe::NodeGraph::GetAllNodes(), GetComponentTypeID_Static(), Olympe::EnumCatalogManager::GetConditionTypes(), Olympe::EnumCatalogManager::GetDecoratorTypes(), m_ContextMenuPosX, and m_ContextMenuPosY.
Referenced by RenderGraph().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::RenderGraph | ( | ) |
Definition at line 433 of file NodeGraphPanel.cpp.
References Olympe::GraphNode::actionType, Olympe::BT_Action, Olympe::BT_Condition, Olympe::BT_Decorator, Olympe::BT_Selector, Olympe::BT_Sequence, Olympe::EditorContext::CanCreate(), Olympe::EditorContext::CanEdit(), Olympe::GraphNode::conditionType, Olympe::GraphNode::decoratorType, Olympe::CommandStack::ExecuteCommand(), Olympe::GraphLink::fromNode, Olympe::BlueprintEditor::Get(), Olympe::EditorContext::Get(), Olympe::EnumCatalogManager::Get(), Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraph(), Olympe::NodeGraphManager::GetActiveGraphId(), Olympe::BlueprintEditor::GetCommandStack(), GetComponentTypeID_Static(), GlobalUIDToLocalNodeID(), HandleNodeInteractions(), m_ContextMenuPosX, m_ContextMenuPosY, m_EditingNodeId, m_NodeNameBuffer, m_SelectedLinkId, m_SelectedNodeId, m_ShowNodeEditModal, Olympe::NodeTypeToString(), and RenderContextMenu().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::RenderGraphTabs | ( | ) |
Definition at line 265 of file NodeGraphPanel.cpp.
References Olympe::NodeGraphManager::CloseGraph(), Olympe::NodeGraphManager::CreateGraph(), Olympe::NodeGraphManager::Get(), Olympe::NodeGraphManager::GetActiveGraphId(), Olympe::NodeGraphManager::GetAllGraphIds(), GetComponentTypeID_Static(), Olympe::NodeGraphManager::GetGraph(), Olympe::NodeGraphManager::GetGraphName(), and Olympe::NodeGraphManager::SetActiveGraph().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::RenderNodeEditModal | ( | ) |
Definition at line 1022 of file NodeGraphPanel.cpp.
References Olympe::BT_Action, Olympe::BT_Condition, Olympe::BT_Decorator, Olympe::EnumCatalogManager::FindActionType(), Olympe::EnumCatalogManager::FindConditionType(), Olympe::EnumCatalogManager::Get(), Olympe::NodeGraphManager::Get(), Olympe::EnumCatalogManager::GetActionTypes(), Olympe::NodeGraphManager::GetActiveGraph(), GetComponentTypeID_Static(), Olympe::EnumCatalogManager::GetConditionTypes(), Olympe::EnumCatalogManager::GetDecoratorTypes(), m_EditingNodeId, m_NodeNameBuffer, m_ShowNodeEditModal, Olympe::NodeTypeToString(), and Olympe::CatalogType::parameters.
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::NodeGraphPanel::RenderNodeProperties | ( | ) |
Definition at line 976 of file NodeGraphPanel.cpp.
| void Olympe::NodeGraphPanel::Shutdown | ( | ) |
Definition at line 59 of file NodeGraphPanel.cpp.
Referenced by Olympe::BlueprintEditorGUI::Shutdown().
Here is the caller graph for this function:| float Olympe::NodeGraphPanel::m_ContextMenuPosX = 0.0f |
Definition at line 52 of file NodeGraphPanel.h.
Referenced by RenderContextMenu(), and RenderGraph().
| float Olympe::NodeGraphPanel::m_ContextMenuPosY = 0.0f |
Definition at line 53 of file NodeGraphPanel.h.
Referenced by RenderContextMenu(), and RenderGraph().
| int Olympe::NodeGraphPanel::m_DraggedNodeId = -1 |
Definition at line 63 of file NodeGraphPanel.h.
| float Olympe::NodeGraphPanel::m_DragStartX = 0.0f |
Definition at line 64 of file NodeGraphPanel.h.
| float Olympe::NodeGraphPanel::m_DragStartY = 0.0f |
Definition at line 65 of file NodeGraphPanel.h.
Definition at line 57 of file NodeGraphPanel.h.
| int Olympe::NodeGraphPanel::m_EditingNodeId = -1 |
Definition at line 58 of file NodeGraphPanel.h.
Referenced by RenderGraph(), and RenderNodeEditModal().
Definition at line 62 of file NodeGraphPanel.h.
| char Olympe::NodeGraphPanel::m_NodeNameBuffer[256] |
Definition at line 59 of file NodeGraphPanel.h.
Referenced by RenderGraph(), and RenderNodeEditModal().
| int Olympe::NodeGraphPanel::m_SelectedLinkId = -1 |
Definition at line 50 of file NodeGraphPanel.h.
Referenced by RenderGraph().
| int Olympe::NodeGraphPanel::m_SelectedNodeId = -1 |
Definition at line 49 of file NodeGraphPanel.h.
Referenced by HandleNodeInteractions(), and RenderGraph().
Definition at line 51 of file NodeGraphPanel.h.
Definition at line 56 of file NodeGraphPanel.h.
Referenced by RenderGraph(), and RenderNodeEditModal().