aboutsummaryrefslogtreecommitdiff
path: root/src/engine/user/cursor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/user/cursor.hpp')
-rw-r--r--src/engine/user/cursor.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/engine/user/cursor.hpp b/src/engine/user/cursor.hpp
index 0317dc5..69d639a 100644
--- a/src/engine/user/cursor.hpp
+++ b/src/engine/user/cursor.hpp
@@ -2,7 +2,8 @@
#include "DI/auto_wirable.hpp"
#include "interfaces/direction.hpp"
-#include "interfaces/vector2.hpp"
+
+#include "engine/data/vector2.hpp"
#include "fmt/core.h"
#include <array>
@@ -21,25 +22,21 @@ constexpr fmt::string_view REQUEST_CURSOR_POSITION = "{esc}[6n";
constexpr fmt::string_view CURSOR_VISIBLE = "{esc}[?25h";
constexpr fmt::string_view CURSOR_INVISIBLE = "{esc}[?25l";
-class CursorController
- : public AutoWirable<CursorController, CursorController, IVector2Factory>
+class CursorController : public AutoWirable<CursorController, CursorController>
{
public:
- explicit CursorController(IVector2Factory vector2_factory);
+ CursorController() = default;
template <Direction::value_type direction>
constexpr void move(const unsigned int &amount) const;
- static void move_to(const IVector2 &pos);
+ static void move_to(const Vector2 &pos);
static void hide();
static void show();
- [[nodiscard]] std::shared_ptr<IVector2> where();
-
-private:
- IVector2Factory _vector2_factory;
+ [[nodiscard]] static Vector2 where();
};
#include "cursor.tpp"