From 87f55120f96d0f4f80b497dc9006d89df2dda125 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 2 Jun 2022 12:17:23 +0200 Subject: refactor: have cursor controller inverting input positions --- src/engine/user/cursor.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/engine/user/cursor.hpp') diff --git a/src/engine/user/cursor.hpp b/src/engine/user/cursor.hpp index de8c3ae..199c86b 100644 --- a/src/engine/user/cursor.hpp +++ b/src/engine/user/cursor.hpp @@ -2,6 +2,7 @@ #include "interfaces/cursor.hpp" +#include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include @@ -48,6 +49,12 @@ public: void show() noexcept override; + void set_bounds(const Bounds &bounds) noexcept override; + private: Vector2 _position; + Bounds _bounds; + + [[nodiscard]] auto _invert_position_y(const Vector2 &position) const noexcept + -> Vector2; }; -- cgit v1.2.3-18-g5258