![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Adapts the existing VisualScriptEditorPanel to the IGraphRenderer interface. More...
#include <VisualScriptRenderer.h>
Inheritance diagram for Olympe::VisualScriptRenderer:
Collaboration diagram for Olympe::VisualScriptRenderer:Classes | |
| struct | CanvasState |
Public Member Functions | |
| VisualScriptRenderer () | |
| ~VisualScriptRenderer () | |
| void | Render () override |
| Renders the graph canvas into the current ImGui child window. | |
| bool | Load (const std::string &path) override |
| Loads a graph from a file on disk. | |
| bool | Save (const std::string &path) override |
| Saves the current graph state to disk. | |
| bool | IsDirty () const override |
| Returns true when the graph has unsaved changes. | |
| std::string | GetGraphType () const override |
| Returns the graph type string, e.g. | |
| std::string | GetCurrentPath () const override |
| Returns the last path successfully loaded/saved, or empty string. | |
| VisualScriptEditorPanel & | GetPanel () |
| Direct access to the wrapped panel (for advanced operations). | |
| void | SaveCanvasState () override |
| Save the current canvas viewport state (pan, zoom, etc.) Called when tab is deactivated. | |
| void | RestoreCanvasState () override |
| Restore previously saved canvas viewport state Called when tab is reactivated. | |
| std::string | GetCanvasStateJSON () const override |
| Get canvas state as JSON string for persistence. | |
| void | SetCanvasStateJSON (const std::string &json) override |
| Restore canvas state from JSON string. | |
Public Member Functions inherited from Olympe::IGraphRenderer | |
| virtual | ~IGraphRenderer () |
Private Member Functions | |
| std::string | ResolvePath (const std::string &path) const |
Private Attributes | |
| VisualScriptEditorPanel | m_panel |
| struct Olympe::VisualScriptRenderer::CanvasState | m_savedCanvasState |
Adapts the existing VisualScriptEditorPanel to the IGraphRenderer interface.
Definition at line 23 of file VisualScriptRenderer.h.
| Olympe::VisualScriptRenderer::VisualScriptRenderer | ( | ) |
Definition at line 25 of file VisualScriptRenderer.cpp.
References Olympe::VisualScriptEditorPanel::Initialize(), and m_panel.
Here is the call graph for this function:| Olympe::VisualScriptRenderer::~VisualScriptRenderer | ( | ) |
Definition at line 30 of file VisualScriptRenderer.cpp.
References m_panel, and Olympe::VisualScriptEditorPanel::Shutdown().
Here is the call graph for this function:
|
overridevirtual |
Get canvas state as JSON string for persistence.
Reimplemented from Olympe::IGraphRenderer.
Definition at line 162 of file VisualScriptRenderer.cpp.
|
overridevirtual |
Returns the last path successfully loaded/saved, or empty string.
Implements Olympe::IGraphRenderer.
Definition at line 128 of file VisualScriptRenderer.cpp.
References Olympe::VisualScriptEditorPanel::GetCurrentPath(), and m_panel.
Here is the call graph for this function:
|
overridevirtual |
Returns the graph type string, e.g.
"VisualScript", "BehaviorTree".
Implements Olympe::IGraphRenderer.
Definition at line 123 of file VisualScriptRenderer.cpp.
|
inline |
Direct access to the wrapped panel (for advanced operations).
Definition at line 37 of file VisualScriptRenderer.h.
References m_panel.
Referenced by Olympe::BlueprintEditorGUI::RenderFixedLayout().
Here is the caller graph for this function:
|
overridevirtual |
Returns true when the graph has unsaved changes.
Implements Olympe::IGraphRenderer.
Definition at line 118 of file VisualScriptRenderer.cpp.
References Olympe::VisualScriptEditorPanel::IsDirty(), and m_panel.
Here is the call graph for this function:Loads a graph from a file on disk.
| path | Absolute or relative path to the .ats / .json file. |
Implements Olympe::IGraphRenderer.
Definition at line 40 of file VisualScriptRenderer.cpp.
References Olympe::BTtoVSMigrator::Convert(), GetComponentTypeID_Static(), Olympe::TaskGraphLoader::LoadFromJson(), Olympe::VisualScriptEditorPanel::LoadTemplate(), m_panel, ResolvePath(), and SYSTEM_LOG.
Here is the call graph for this function:
|
overridevirtual |
Renders the graph canvas into the current ImGui child window.
Implements Olympe::IGraphRenderer.
Definition at line 35 of file VisualScriptRenderer.cpp.
References m_panel, and Olympe::VisualScriptEditorPanel::RenderContent().
Here is the call graph for this function:
|
private |
Definition at line 134 of file VisualScriptRenderer.cpp.
References DataManager::Get(), GetComponentTypeID_Static(), DataManager::ResolveFilePath(), and SYSTEM_LOG.
Referenced by Load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Restore previously saved canvas viewport state Called when tab is reactivated.
Ensures smooth tab switching without losing layout.
Reimplemented from Olympe::IGraphRenderer.
Definition at line 156 of file VisualScriptRenderer.cpp.
Saves the current graph state to disk.
| path | Destination path. If empty, save to the path passed to Load(). |
Implements Olympe::IGraphRenderer.
Definition at line 111 of file VisualScriptRenderer.cpp.
References m_panel, Olympe::VisualScriptEditorPanel::Save(), and Olympe::VisualScriptEditorPanel::SaveAs().
Here is the call graph for this function:
|
overridevirtual |
Save the current canvas viewport state (pan, zoom, etc.) Called when tab is deactivated.
Used to preserve viewport when switching between multiple tabs.
Reimplemented from Olympe::IGraphRenderer.
Definition at line 149 of file VisualScriptRenderer.cpp.
Restore canvas state from JSON string.
| json | JSON representation of saved canvas state |
Reimplemented from Olympe::IGraphRenderer.
Definition at line 168 of file VisualScriptRenderer.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
private |
Definition at line 46 of file VisualScriptRenderer.h.
Referenced by GetCurrentPath(), GetPanel(), IsDirty(), Load(), Render(), Save(), VisualScriptRenderer(), and ~VisualScriptRenderer().
|
private |