aboutsummaryrefslogtreecommitdiff
path: root/src/game/input_configurator.tpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-05 13:26:55 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:54 +0200
commit6119f1428b3615e4738a121c6acf343942107fd9 (patch)
tree47eb5537674fe58ae8ad388521203b92bfb43529 /src/game/input_configurator.tpp
parentd27f1a89266e141a944f88e9080bdeca95c49da3 (diff)
refactor: move input config to own file & improve cleanup
Diffstat (limited to 'src/game/input_configurator.tpp')
-rw-r--r--src/game/input_configurator.tpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/input_configurator.tpp b/src/game/input_configurator.tpp
new file mode 100644
index 0000000..f3c9482
--- /dev/null
+++ b/src/game/input_configurator.tpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "input_configurator.hpp"
+
+namespace InputActions
+{
+
+template <Direction::value_type direction>
+auto move_cursor(CursorController cursor_controller)
+{
+ return [cursor_controller]()
+ {
+ cursor_controller.move<direction>(1U);
+ };
+}
+
+} // namespace InputActions