![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Main AI Editor GUI class. More...
#include <AIEditorGUI.h>
Collaboration diagram for Olympe::AI::AIEditorGUI:Public Member Functions | |
| AIEditorGUI () | |
| ~AIEditorGUI () | |
| bool | Initialize () |
| Initialize the editor. | |
| void | Shutdown () |
| Shutdown and cleanup. | |
| void | Render () |
| Render the complete UI. | |
| void | Update (float deltaTime) |
| Update (called per frame) | |
| bool | IsActive () const |
| Check if editor is active. | |
| void | SetActive (bool active) |
| Set editor active state. | |
| NodeGraph::CommandStack & | GetCommandStack () |
| Get command stack for undo/redo. | |
Static Private Member Functions | |
| static std::string | ExtractDirectory (const std::string &filepath) |
| Extract directory from filepath. | |
| static std::string | ExtractFilename (const std::string &filepath) |
| Extract filename from filepath. | |
| static bool | EndsWith (const std::string &str, const std::string &suffix) |
| Check if string ends with suffix. | |
Private Attributes | |
| bool | m_isActive |
| bool | m_showNodePalette |
| bool | m_showBlackboardPanel |
| bool | m_showSensesPanel |
| bool | m_showRuntimeDebugPanel |
| char | m_assetSearchFilter [256] |
| std::vector< std::string > | m_assetFiles |
| std::string | m_lastOpenPath |
| std::string | m_lastSavePath |
| std::unique_ptr< BTNodePalette > | m_nodePalette |
| BlackboardPanel | m_blackboardPanel |
| NodeGraph::CommandStack | m_commandStack |
| void * | m_imnodesContext |
| std::vector< int > | m_selectedNodeIds |
| std::vector< int > | m_selectedLinkIds |
Friends | |
| class | AIEditorMenus |
Manages the complete AI Editor interface. Integrates NodeGraphCore for graph management and AIGraphPlugin_BT for BT-specific functionality.
Definition at line 41 of file AIEditorGUI.h.
| Olympe::AI::AIEditorGUI::AIEditorGUI | ( | ) |
Definition at line 32 of file AIEditorGUI.cpp.
References m_assetSearchFilter.
| Olympe::AI::AIEditorGUI::~AIEditorGUI | ( | ) |
Definition at line 43 of file AIEditorGUI.cpp.
References Shutdown().
Here is the call graph for this function:
|
staticprivate |
Check if string ends with suffix.
| str | String to check |
| suffix | Suffix to look for |
Definition at line 938 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
staticprivate |
Extract directory from filepath.
| filepath | Full file path |
Definition at line 920 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
staticprivate |
Extract filename from filepath.
| filepath | Full file path |
Definition at line 929 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
inline |
Get command stack for undo/redo.
Definition at line 84 of file AIEditorGUI.h.
References m_commandStack.
|
private |
Handle link creation.
Definition at line 516 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), SYSTEM_LOG, and Olympe::NodeGraph::PinId::value.
Referenced by RenderNodeGraphCanvas().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Handle node creation from palette.
Definition at line 491 of file AIEditorGUI.cpp.
References m_nodePalette.
Referenced by RenderNodeGraphCanvas().
Here is the caller graph for this function:
|
private |
Handle node selection.
Definition at line 499 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static(), m_selectedLinkIds, and m_selectedNodeIds.
Referenced by RenderNodeGraphCanvas().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Olympe::AI::AIEditorGUI::Initialize | ( | ) |
Initialize the editor.
Definition at line 52 of file AIEditorGUI.cpp.
References Olympe::AI::BTNodeRegistry::Get(), GetComponentTypeID_Static(), m_imnodesContext, m_isActive, m_nodePalette, ScanAIGraphDirectory(), and SYSTEM_LOG.
Referenced by Test10_NodePaletteIntegration(), Test11_ClipboardCopyPaste(), Test12_ClipboardCut(), Test13_ClipboardLinkPreservation(), Test14_LayoutEngineNoOverlap(), Test15_SaveLoadIntegration(), Test1_InitializeAIEditorGUI(), Test2_CreateNewBTGraph(), Test3_LoadExistingBT(), Test4_NodeCreationViaPalette(), Test5_UndoRedo(), Test6_ValidateGraph(), Test7_SaveLoadRoundtrip(), Test8_MultiGraphTabs(), and Test9_BlackboardPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
private |
Definition at line 911 of file AIEditorGUI.cpp.
References SYSTEM_LOG.
Referenced by RenderMenuBar().
Here is the caller graph for this function:
|
private |
Definition at line 685 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderMenuBar().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 719 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 777 of file AIEditorGUI.cpp.
References Olympe::AI::AIEditorClipboard::Copy(), Olympe::AI::AIEditorClipboard::Get(), Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_selectedNodeIds, SYSTEM_LOG, and Olympe::NodeGraph::NodeId::value.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 746 of file AIEditorGUI.cpp.
References Olympe::AI::AIEditorClipboard::Cut(), Olympe::AI::AIEditorClipboard::Get(), Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_selectedNodeIds, SYSTEM_LOG, and Olympe::NodeGraph::NodeId::value.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 832 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_selectedNodeIds, SYSTEM_LOG, and Olympe::NodeGraph::NodeId::value.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 600 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 609 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderMenuBar().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 618 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_lastOpenPath, Olympe::AI::AIEditorFileDialog::OpenFile(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 805 of file AIEditorGUI.cpp.
References Olympe::AI::AIEditorClipboard::Get(), Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_selectedNodeIds, Olympe::AI::AIEditorClipboard::Paste(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 738 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::CommandStack::CanRedo(), Olympe::NodeGraph::CommandStack::GetRedoDescription(), m_commandStack, Olympe::NodeGraph::CommandStack::Redo(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 880 of file AIEditorGUI.cpp.
References m_showBlackboardPanel, m_showNodePalette, m_showRuntimeDebugPanel, m_showSensesPanel, and SYSTEM_LOG.
Referenced by RenderMenuBar().
Here is the caller graph for this function:
|
private |
Definition at line 638 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 664 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_lastSavePath, Olympe::AI::AIEditorFileDialog::SaveFile(), and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 859 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), Olympe::NodeGraph::GraphDocument::GetNodes(), m_selectedNodeIds, and SYSTEM_LOG.
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 896 of file AIEditorGUI.cpp.
References m_showBlackboardPanel.
|
private |
Definition at line 891 of file AIEditorGUI.cpp.
References m_showNodePalette.
|
private |
Definition at line 906 of file AIEditorGUI.cpp.
References m_showRuntimeDebugPanel.
|
private |
Definition at line 901 of file AIEditorGUI.cpp.
References m_showSensesPanel.
|
private |
Definition at line 730 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::CommandStack::CanUndo(), Olympe::NodeGraph::CommandStack::GetUndoDescription(), m_commandStack, SYSTEM_LOG, and Olympe::NodeGraph::CommandStack::Undo().
Referenced by RenderMenuBar(), and Update().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::AI::AIEditorGUI::Render | ( | ) |
Render the complete UI.
Definition at line 196 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static(), m_isActive, m_nodePalette, m_showBlackboardPanel, m_showNodePalette, m_showRuntimeDebugPanel, m_showSensesPanel, RenderAssetBrowser(), RenderBlackboardPanel(), RenderInspector(), RenderMenuBar(), RenderNodeGraph(), RenderRuntimeDebugPanel(), and RenderSensesPanel().
Here is the call graph for this function:
|
private |
Render asset browser panel (left)
Definition at line 351 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static(), m_assetFiles, m_assetSearchFilter, and RenderAssetEntry().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render asset entry.
| filename | Filename to render |
| fullPath | Full path to file |
Definition at line 384 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by RenderAssetBrowser().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render blackboard inspector panel.
Definition at line 561 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_blackboardPanel, m_showBlackboardPanel, and Olympe::AI::BlackboardPanel::Render().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render connections between nodes.
Definition at line 472 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and Olympe::NodeGraph::GraphDocument::GetLinks().
Referenced by RenderNodeGraphCanvas().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render inspector panel (right)
Definition at line 543 of file AIEditorGUI.cpp.
References m_selectedNodeIds.
Referenced by Render().
Here is the caller graph for this function:
|
private |
Render main menu bar.
Definition at line 260 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::CommandStack::CanRedo(), Olympe::NodeGraph::CommandStack::CanUndo(), m_commandStack, m_showBlackboardPanel, m_showNodePalette, m_showRuntimeDebugPanel, m_showSensesPanel, MenuAction_About(), MenuAction_AutoLayout(), MenuAction_Close(), MenuAction_Copy(), MenuAction_Cut(), MenuAction_Delete(), MenuAction_NewBT(), MenuAction_NewHFSM(), MenuAction_Open(), MenuAction_Paste(), MenuAction_Redo(), MenuAction_ResetLayout(), MenuAction_Save(), MenuAction_SaveAs(), MenuAction_SelectAll(), and MenuAction_Undo().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render a single node.
| nodeId | Node to render |
Definition at line 442 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_selectedNodeIds, Olympe::AI::AIEditorNodeRenderer::RenderNode(), and Olympe::NodeGraph::NodeId::value.
Referenced by RenderNodeGraphCanvas().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render node graph panel (center)
Definition at line 396 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), and RenderNodeGraphCanvas().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render node graph with ImNodes.
Definition at line 414 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), Olympe::NodeGraph::GraphDocument::GetNodes(), HandleLinkCreation(), HandleNodeCreation(), HandleNodeSelection(), m_imnodesContext, RenderConnections(), and RenderNode().
Referenced by RenderNodeGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Render runtime debug panel (entity list + execution)
Definition at line 583 of file AIEditorGUI.cpp.
References m_showRuntimeDebugPanel.
Referenced by Render().
Here is the caller graph for this function:
|
private |
Render AI senses debug panel.
Definition at line 570 of file AIEditorGUI.cpp.
References m_showSensesPanel.
Referenced by Render().
Here is the caller graph for this function:Scan directory for AI graphs.
Definition at line 376 of file AIEditorGUI.cpp.
References GetComponentTypeID_Static(), m_assetFiles, and SYSTEM_LOG.
Referenced by Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:Set editor active state.
Definition at line 79 of file AIEditorGUI.h.
References GetComponentTypeID_Static(), and m_isActive.
Here is the call graph for this function:| void Olympe::AI::AIEditorGUI::Shutdown | ( | ) |
Shutdown and cleanup.
Definition at line 81 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::CommandStack::Clear(), GetComponentTypeID_Static(), m_commandStack, m_imnodesContext, m_isActive, m_nodePalette, and SYSTEM_LOG.
Referenced by ~AIEditorGUI().
Here is the call graph for this function:
Here is the caller graph for this function:Update (called per frame)
| deltaTime | Time since last frame |
Definition at line 104 of file AIEditorGUI.cpp.
References Olympe::NodeGraph::CommandStack::ExecuteCommand(), Olympe::NodeGraph::NodeGraphManager::Get(), GetComponentTypeID_Static(), m_commandStack, m_isActive, m_selectedNodeIds, MenuAction_Close(), MenuAction_Copy(), MenuAction_Cut(), MenuAction_Delete(), MenuAction_NewBT(), MenuAction_Open(), MenuAction_Paste(), MenuAction_Redo(), MenuAction_Save(), MenuAction_SaveAs(), MenuAction_SelectAll(), and MenuAction_Undo().
Here is the call graph for this function:
|
friend |
Definition at line 44 of file AIEditorGUI.h.
|
private |
Definition at line 244 of file AIEditorGUI.h.
Referenced by RenderAssetBrowser(), and ScanAIGraphDirectory().
|
private |
Definition at line 243 of file AIEditorGUI.h.
Referenced by AIEditorGUI(), and RenderAssetBrowser().
|
private |
Definition at line 254 of file AIEditorGUI.h.
Referenced by RenderBlackboardPanel().
|
private |
Definition at line 257 of file AIEditorGUI.h.
Referenced by GetCommandStack(), MenuAction_Redo(), MenuAction_Undo(), RenderMenuBar(), Shutdown(), and Update().
|
private |
Definition at line 260 of file AIEditorGUI.h.
Referenced by Initialize(), RenderNodeGraphCanvas(), and Shutdown().
|
private |
Definition at line 236 of file AIEditorGUI.h.
Referenced by Initialize(), IsActive(), Render(), SetActive(), Shutdown(), and Update().
|
private |
Definition at line 247 of file AIEditorGUI.h.
Referenced by MenuAction_Open().
|
private |
Definition at line 248 of file AIEditorGUI.h.
Referenced by MenuAction_SaveAs().
|
private |
Definition at line 251 of file AIEditorGUI.h.
Referenced by HandleNodeCreation(), Initialize(), Render(), and Shutdown().
|
private |
Definition at line 264 of file AIEditorGUI.h.
Referenced by HandleNodeSelection().
|
private |
Definition at line 263 of file AIEditorGUI.h.
Referenced by HandleNodeSelection(), MenuAction_Copy(), MenuAction_Cut(), MenuAction_Delete(), MenuAction_Paste(), MenuAction_SelectAll(), RenderInspector(), RenderNode(), and Update().
|
private |
Definition at line 238 of file AIEditorGUI.h.
Referenced by MenuAction_ResetLayout(), MenuAction_ShowBlackboard(), Render(), RenderBlackboardPanel(), and RenderMenuBar().
|
private |
Definition at line 237 of file AIEditorGUI.h.
Referenced by MenuAction_ResetLayout(), MenuAction_ShowNodePalette(), Render(), and RenderMenuBar().
|
private |
Definition at line 240 of file AIEditorGUI.h.
Referenced by MenuAction_ResetLayout(), MenuAction_ShowRuntimeDebug(), Render(), RenderMenuBar(), and RenderRuntimeDebugPanel().
|
private |
Definition at line 239 of file AIEditorGUI.h.
Referenced by MenuAction_ResetLayout(), MenuAction_ShowSensesPanel(), Render(), RenderMenuBar(), and RenderSensesPanel().