aboutsummaryrefslogtreecommitdiff
path: root/source/EditorCore.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-05-06 19:52:12 -0700
committerrtk0c <[email protected]>2022-05-06 19:52:12 -0700
commitcde94efdd44553f3f6575ce84b44c6799e1a1425 (patch)
tree593b9f280f2e223268f8d5c73f5d1dd1aba50c36 /source/EditorCore.hpp
parent4c9f5ee706faa1435b7dc2f3b6d4753e1289c351 (diff)
Changeset: 22 Improved camera and various cleanups
Diffstat (limited to 'source/EditorCore.hpp')
-rw-r--r--source/EditorCore.hpp12
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; }