diff options
author | hnOsmium0001 <[email protected]> | 2022-05-06 19:52:12 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-05-06 19:52:12 -0700 |
commit | d98a4159d86406a47628aa58bae9f3308fea4fd0 (patch) | |
tree | 4b5ee8aef4a099503801ea731e6fb3c724433cdf /source/EditorCore.hpp | |
parent | e663fb70fa47764db4576315b78143b6d23ddfa3 (diff) |
Improved camera and various cleanups
Diffstat (limited to 'source/EditorCore.hpp')
-rw-r--r-- | source/EditorCore.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/EditorCore.hpp b/source/EditorCore.hpp index 785fc6b..8b70ee0 100644 --- a/source/EditorCore.hpp +++ b/source/EditorCore.hpp @@ -71,23 +71,25 @@ private: bool showGrid = false; public: - void ShowWorld(float* cameraView, float* cameraProjection); + void ShowWorld(Camera* camera); bool ShowObjectInspector(float* cameraView, float* cameraProjection, glm::vec3* pos, glm::quat* rotation, glm::vec3* scale); bool ShowObject(float* cameraView, float* cameraProjection, glm::vec3* pos, glm::quat* rotation, glm::vec3* scale); }; +// TODO editor undo stack class App; class EditorInstance { private: App* mApp; - RendererFrameInfo mFallbackFrameInfo; - const RendererFrameInfo* mCurrentFrameInfo; GameObject* mPopupCurrent_GameObject = nullptr; + Camera mEditorCamera; RcPtr<SpriteDefinition> mSpriteView_Instance; EditorCommandPalette mEdCommandPalette; EditorInspector mEdInspector; EditorContentBrowser mEdContentBrowser; EditorTransformEdit mEdTransformEdit; + glm::vec3 mDragCam_CamInitial; + ImVec2 mDragCam_CursorInitial; int mSpriteView_Frame; bool mSpriteView_OpenNextFrame = false; bool mWindowVisible_ImGuiDemo = false; @@ -96,13 +98,13 @@ private: bool mWindowVisible_ContentBrowser = true; bool mWindowVisible_WorldStructure = true; bool mWindowVisible_WorldProperties = true; + bool mDragCam_Happening = false; public: EditorInstance(App* app); ~EditorInstance(); - void OnUpdate(); - void OnDraw(const RendererFrameInfo& frameInfo); + void OnGameStateChanged(bool running); void Show(); EditorInspector& GetInspector() { return mEdInspector; } |