Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
EntityPrefabEditorPlugin.h
Go to the documentation of this file.
1/*
2 * Olympe Blueprint Editor - Entity Prefab Plugin
3 *
4 * Plugin for editing Entity Prefab blueprints
5 */
6
7#pragma once
8
10
11namespace Olympe
12{
14 {
15 public:
18
19 // Identification
20 std::string GetBlueprintType() const override { return "EntityPrefab"; }
21 std::string GetDisplayName() const override { return "Entity Prefab"; }
22 std::string GetDescription() const override { return "Entity template with components"; }
23 std::string GetIconPath() const override { return "Resources/Icons/entity_prefab.png"; }
24 std::string GetDefaultFolder() const override { return "Blueprints/EntityPrefab/"; }
25
26 // Lifecycle
27 nlohmann::json CreateNew(const std::string& name) override;
28 bool CanHandle(const nlohmann::json& blueprint) const override;
29 std::vector<ValidationError> Validate(const nlohmann::json& blueprint) override;
30
31 // Rendering
32 void RenderEditor(nlohmann::json& blueprintData, EditorContext_st& ctx) override;
33 void RenderProperties(const nlohmann::json& blueprintData) override;
34 void RenderToolbar(nlohmann::json& blueprintData) override;
35
36 private:
38 void AddComponentToBlueprint(nlohmann::json& blueprintData, const std::string& type);
39 std::vector<std::string> GetAvailableComponentTypes();
40 std::string GetCurrentTimestamp();
41 };
42}
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
BlueprintEditorPlugin - Base interface for blueprint type plugins Each plugin handles a specific blue...
void RenderEditor(nlohmann::json &blueprintData, EditorContext_st &ctx) override
std::string GetIconPath() const override
nlohmann::json CreateNew(const std::string &name) override
bool CanHandle(const nlohmann::json &blueprint) const override
void RenderProperties(const nlohmann::json &blueprintData) override
void AddComponentToBlueprint(nlohmann::json &blueprintData, const std::string &type)
std::string GetDisplayName() const override
std::string GetBlueprintType() const override
std::string GetDescription() const override
std::vector< std::string > GetAvailableComponentTypes()
void RenderToolbar(nlohmann::json &blueprintData) override
std::vector< ValidationError > Validate(const nlohmann::json &blueprint) override
void RenderComponentPropertiesEditor(nlohmann::json &properties, EditorContext_st &ctx)
std::string GetDefaultFolder() const override
nlohmann::json json