From e47a98793e58a5dbbe76bfed27e59408e43538e4 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 Date: Fri, 8 Apr 2022 22:30:12 -0700 Subject: More work --- source/EditorCore.hpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 source/EditorCore.hpp (limited to 'source/EditorCore.hpp') diff --git a/source/EditorCore.hpp b/source/EditorCore.hpp new file mode 100644 index 0000000..3f9eb11 --- /dev/null +++ b/source/EditorCore.hpp @@ -0,0 +1,44 @@ +#pragma once + +#include "GameObject.hpp" +#include "World.hpp" + +#include +#include + +class App; + +namespace ImGui { +const char* GetKeyNameGlfw(int key); +} // namespace ImGui + +class EditorGameObjectAttachment { +public: + std::string name; + +public: + static std::unique_ptr Create(GameObject* object); + virtual ~EditorGameObjectAttachment() = default; +}; + +class EditorInstance { +private: + App* mApp; + GameWorld* mWorld; + GameObject* mSelectedGameObject = nullptr; + +public: + EditorInstance(App* app, GameWorld* world) + : mApp{ app } + , mWorld{ world } {} + + void Show(); + +private: + void ShowWorldProperties(); + + void ShowInspector(); + void ShowGameObjecetFields(GameObject* object); + + void ShowGameObjectInTree(GameObject* object); +}; -- cgit v1.2.3-70-g09d2