diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-22 12:16:38 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-22 12:16:38 +0000 |
commit | e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3 (patch) | |
tree | 1612baf22456c0b5a1bef82980177afb34b2756c /ui/manualCameraController.h | |
parent | Window handles UIComponent rendering (diff) | |
download | ilt-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.h | 10 |
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; |