]> git.localhorst.tv Git - blobs.git/blobdiff - src/app/MasterState.hpp
camera controls
[blobs.git] / src / app / MasterState.hpp
index d2072ee326c27a30683a18558ff2d6c3de7194d1..24a29e696463e960918708f1be4151e4429b2de7 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "Assets.hpp"
 #include "../graphics/Camera.hpp"
+#include "../ui/CreaturePanel.hpp"
 
 
 namespace blobs {
@@ -31,10 +32,17 @@ public:
        graphics::Camera &GetCamera() noexcept { return cam; }
        const graphics::Camera &GetCamera() const noexcept { return cam; }
 
+       ui::CreaturePanel &GetCreaturePanel() noexcept { return cp; }
+       const ui::CreaturePanel &GetCreaturePanel() const noexcept { return cp; }
+
 private:
        void OnResize(int w, int h) override;
 
        void OnKeyDown(const SDL_KeyboardEvent &) override;
+       void OnMouseDown(const SDL_MouseButtonEvent &) override;
+       void OnMouseUp(const SDL_MouseButtonEvent &) override;
+       void OnMouseMotion(const SDL_MouseMotionEvent &) override;
+       void OnMouseWheel(const SDL_MouseWheelEvent &) override;
 
        void OnUpdate(int dt) override;
        void OnRender(graphics::Viewport &) override;
@@ -47,6 +55,12 @@ private:
        world::Simulation ∼
 
        graphics::Camera cam;
+       double cam_dist;
+       double cam_tgt_dist;
+       glm::dvec3 cam_orient;
+       bool cam_dragging;
+
+       ui::CreaturePanel cp;
 
        int remain;
        int thirds;