summaryrefslogtreecommitdiff
path: root/ui/manualCameraController.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-22 12:16:38 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-22 12:16:38 +0000
commite806d41c8703ddc4bcaf2186d0c1701bd1e1ada3 (patch)
tree1612baf22456c0b5a1bef82980177afb34b2756c /ui/manualCameraController.h
parentWindow handles UIComponent rendering (diff)
downloadilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.tar.bz2
ilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.tar.xz
ilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.zip
Initial commit with some basic UI
Diffstat (limited to 'ui/manualCameraController.h')
-rw-r--r--ui/manualCameraController.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/manualCameraController.h b/ui/manualCameraController.h
index ceff9ac..5ed45f5 100644
--- a/ui/manualCameraController.h
+++ b/ui/manualCameraController.h
@@ -1,19 +1,21 @@
#ifndef MANUAL_CAMERA_CONTROLLER_H
#define MANUAL_CAMERA_CONTROLLER_H
-#include "inputHandler.h"
+#include "uiComponent.h"
#include <SDL2/SDL.h>
#include <gfx/camera_controller.h>
#include <glm/glm.hpp>
#include <maths.h>
+class UIShader;
class Camera;
-class ManualCameraController : public CameraController, public InputHandler {
+class ManualCameraController : public CameraController, public UIComponent {
public:
- explicit ManualCameraController(glm::vec2 f) : focus {f} { }
+ explicit ManualCameraController(glm::vec2 f) : UIComponent {{}}, focus {f} { }
- bool handleInput(const SDL_Event & e) override;
+ bool handleInput(const SDL_Event & e, const Position &) override;
+ void render(const UIShader &, const Position & parentPos) const override;
void updateCamera(Camera * camera) const override;