Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
BlueprintEditorPlugin.h
Go to the documentation of this file.
1/*
2 * Olympe Blueprint Editor - Plugin Interface
3 *
4 * Extensible plugin system for different blueprint types
5 * Each plugin handles a specific blueprint type (BehaviorTree, HFSM, EntityPrefab, etc.)
6 */
7
8#pragma once
9
10#include <string>
11#include <vector>
12#include <memory>
13#include "../../Source/third_party/nlohmann/json.hpp"
14#include "BlueprintValidator.h"
15
16namespace Olympe
17{
18 // Editor context for plugins
20 {
21 bool isDirty = false;
22 float deltaTime = 0.0f;
23
24 };/**/
25
26 /**
27 * BlueprintEditorPlugin - Base interface for blueprint type plugins
28 * Each plugin handles a specific blueprint type with custom rendering and validation
29 */
31 {
32 public:
33 virtual ~BlueprintEditorPlugin() = default;
34
35 // ===== Identification =====
36 virtual std::string GetBlueprintType() const = 0;
37 virtual std::string GetDisplayName() const = 0;
38 virtual std::string GetDescription() const = 0;
39 virtual std::string GetIconPath() const = 0;
40 virtual std::string GetDefaultFolder() const = 0;
41
42 // ===== Lifecycle =====
43 virtual nlohmann::json CreateNew(const std::string& name) = 0;
44 virtual bool CanHandle(const nlohmann::json& blueprint) const = 0;
45 virtual std::vector<ValidationError> Validate(const nlohmann::json& blueprint) = 0;
46
47 // ===== Rendering =====
48 virtual void RenderEditor(nlohmann::json& blueprintData, EditorContext_st& ctx) = 0;
49 virtual void RenderProperties(const nlohmann::json& blueprintData) = 0;
50 virtual void RenderToolbar(nlohmann::json& blueprintData) = 0;
51 };
52}
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
BlueprintEditorPlugin - Base interface for blueprint type plugins Each plugin handles a specific blue...
virtual std::string GetDefaultFolder() const =0
virtual void RenderEditor(nlohmann::json &blueprintData, EditorContext_st &ctx)=0
virtual void RenderToolbar(nlohmann::json &blueprintData)=0
virtual ~BlueprintEditorPlugin()=default
virtual nlohmann::json CreateNew(const std::string &name)=0
virtual std::string GetBlueprintType() const =0
virtual std::string GetDisplayName() const =0
virtual std::string GetIconPath() const =0
virtual void RenderProperties(const nlohmann::json &blueprintData)=0
virtual std::string GetDescription() const =0
virtual std::vector< ValidationError > Validate(const nlohmann::json &blueprint)=0
virtual bool CanHandle(const nlohmann::json &blueprint) const =0
nlohmann::json json