aboutsummaryrefslogtreecommitdiff
path: root/src/input_actions.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-10 20:16:14 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:55 +0200
commitc988905add09cf8baf46dc61279528f6f39f7a1a (patch)
tree0c53a36569875f8d4c6e53392876e10fa695c35e /src/input_actions.cpp
parent38f14606c78c119d452f302f17329455e29a9a6f (diff)
feat: add status bar
Diffstat (limited to 'src/input_actions.cpp')
-rw-r--r--src/input_actions.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input_actions.cpp b/src/input_actions.cpp
index 854dc62..5df6e5f 100644
--- a/src/input_actions.cpp
+++ b/src/input_actions.cpp
@@ -12,9 +12,10 @@ void exit_success()
Callback move_cursor(const Vector2 &direction,
const std::shared_ptr<ICursorController> &cursor_controller,
+ const std::shared_ptr<IScene> &scene,
const std::shared_ptr<IWindow> &window)
{
- return [direction, cursor_controller, window]()
+ return [direction, cursor_controller, scene, window]()
{
constexpr int32_t amount = 1;
@@ -29,6 +30,9 @@ Callback move_cursor(const Vector2 &direction,
}
cursor_controller->move_to(new_position);
+
+ scene->write_status(
+ fmt::format("X: {} Y {}", new_position.get_x(), new_position.get_y()));
};
}