diff options
author | hnOsmium0001 <[email protected]> | 2022-04-08 22:30:12 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-04-08 22:30:12 -0700 |
commit | e47a98793e58a5dbbe76bfed27e59408e43538e4 (patch) | |
tree | 250eb4c4200efb63c493ac6f4adb83c89be10ea1 /source/EditorCore.hpp | |
parent | 3fdc6eb4f2cbeffce9b250beec4d3a2d52a3f534 (diff) |
More work
Diffstat (limited to 'source/EditorCore.hpp')
-rw-r--r-- | source/EditorCore.hpp | 44 |
1 files changed, 44 insertions, 0 deletions
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 <memory> +#include <string> + +class App; + +namespace ImGui { +const char* GetKeyNameGlfw(int key); +} // namespace ImGui + +class EditorGameObjectAttachment { +public: + std::string name; + +public: + static std::unique_ptr<EditorGameObjectAttachment> 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); +}; |