aboutsummaryrefslogtreecommitdiff
path: root/src/engine/user/cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/user/cursor.cpp')
-rw-r--r--src/engine/user/cursor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/engine/user/cursor.cpp b/src/engine/user/cursor.cpp
index 44e24dc..391a91a 100644
--- a/src/engine/user/cursor.cpp
+++ b/src/engine/user/cursor.cpp
@@ -5,6 +5,15 @@
#include <cstdlib>
#include <iostream>
+void CursorController::move(const Vector2 &direction, const uint32_t &amount)
+{
+ auto format = direction_format_map.at(direction);
+
+ fmt::print(fmt::runtime(format.data()), fmt::arg("esc", ESC),
+ fmt::arg("amount", amount));
+ std::cout.flush();
+}
+
void CursorController::move_to(const Vector2 &pos)
{
fmt::print(MOVE_CURSOR_TO, fmt::arg("esc", ESC), fmt::arg("row", pos.get_y()),