summaryrefslogtreecommitdiff
path: root/gfx/manualCameraController.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/manualCameraController.h')
-rw-r--r--gfx/manualCameraController.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gfx/manualCameraController.h b/gfx/manualCameraController.h
new file mode 100644
index 0000000..112ec5c
--- /dev/null
+++ b/gfx/manualCameraController.h
@@ -0,0 +1,25 @@
+#ifndef MANUAL_CAMERA_CONTROLLER_H
+#define MANUAL_CAMERA_CONTROLLER_H
+
+#include "game/worldobject.h"
+#include "inputHandler.h"
+#include <SDL2/SDL.h>
+#include <gfx/camera_controller.h>
+#include <optional>
+
+class Camera;
+class Shader;
+
+class ManualCameraController : public CameraController, public InputHandler {
+public:
+ bool handleInput(SDL_Event & e) override;
+
+ void tick(TickDuration) override { }
+
+ void updateCamera(Camera * camera, Shader * shader) const override;
+
+private:
+ bool ctrl {false}, mrb {false};
+ mutable std::optional<SDL_MouseMotionEvent> motion;
+};
+#endif