From a849c199d970e153580c312a24cfdfa099bc7b69 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 9 Apr 2022 13:29:41 -0700 Subject: Changeset: 4 More work on editor --- source/EditorCore.hpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'source/EditorCore.hpp') diff --git a/source/EditorCore.hpp b/source/EditorCore.hpp index 3f9eb11..a9ef93a 100644 --- a/source/EditorCore.hpp +++ b/source/EditorCore.hpp @@ -1,5 +1,8 @@ #pragma once +#include "EditorAttachment.hpp" +#include "EditorInspector.hpp" +#include "EditorResources.hpp" #include "GameObject.hpp" #include "World.hpp" @@ -7,37 +10,24 @@ #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; + EditorInspector mEdInspector; + EditorContentBrowser mEdContentBrowser; public: - EditorInstance(App* app, GameWorld* world) - : mApp{ app } - , mWorld{ world } {} + EditorInstance(App* app, GameWorld* world); + ~EditorInstance(); void Show(); private: void ShowWorldProperties(); - void ShowInspector(); + void ShowInspector(GameObject* object); void ShowGameObjecetFields(GameObject* object); void ShowGameObjectInTree(GameObject* object); -- cgit v1.2.3-70-g09d2