Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
EditorContext.cpp
Go to the documentation of this file.
1/**
2 * @file EditorContext.cpp
3 * @brief Editor mode and capabilities management implementation
4 * @author Olympe Engine - NodeGraph Core v2.0
5 * @date 2025-02-19
6 */
7
8#include "EditorContext.h"
9
10namespace Olympe
11{
12namespace NodeGraph
13{
14
16 : m_mode(mode)
17{
18 // Configure capabilities based on mode
19 switch (m_mode)
20 {
21 case EditorMode::Editor:
22 // Full editing capabilities
32 break;
33
34 case EditorMode::Visualizer:
35 // Read-only mode
41 m_capabilities.canUndo = false;
42 m_capabilities.canRedo = false;
43 m_capabilities.canSave = false;
45 break;
46
47 case EditorMode::Debug:
48 // Read-only + runtime state
54 m_capabilities.canUndo = false;
55 m_capabilities.canRedo = false;
56 m_capabilities.canSave = false;
58 break;
59 }
60}
61
63{
64 return EditorContext(EditorMode::Editor);
65}
66
68{
69 return EditorContext(EditorMode::Visualizer);
70}
71
73{
74 return EditorContext(EditorMode::Debug);
75}
76
77} // namespace NodeGraph
78} // namespace Olympe
Editor mode and capabilities management.
Contexte d'édition pour un graphe.
static EditorContext CreateVisualizer()
Créer un contexte en mode visualisation.
static EditorContext CreateDebugger()
Créer un contexte en mode debug.
static EditorContext CreateEditor()
Créer un contexte en mode édition.
< Provides AssetID and INVALID_ASSET_ID