diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-05 13:26:55 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:54 +0200 |
commit | 6119f1428b3615e4738a121c6acf343942107fd9 (patch) | |
tree | 47eb5537674fe58ae8ad388521203b92bfb43529 /src/game/input_configurator.hpp | |
parent | d27f1a89266e141a944f88e9080bdeca95c49da3 (diff) |
refactor: move input config to own file & improve cleanup
Diffstat (limited to 'src/game/input_configurator.hpp')
-rw-r--r-- | src/game/input_configurator.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/game/input_configurator.hpp b/src/game/input_configurator.hpp new file mode 100644 index 0000000..217c21e --- /dev/null +++ b/src/game/input_configurator.hpp @@ -0,0 +1,36 @@ +#pragma once + +#include "DI/auto_wirable.hpp" +#include "interfaces/direction.hpp" +#include "interfaces/input.hpp" +#include "interfaces/input_configurator.hpp" + +#include "engine/user/cursor.hpp" + +#include <array> +#include <memory> + +namespace InputActions +{ + +template <Direction::value_type direction> +auto move_cursor(CursorController cursor_controller); + +void exit_success(); + +} // namespace InputActions + +class InputConfigurator + : public IInputConfigurator, + public AutoWirable<IInputConfigurator, InputConfigurator, CursorController> +{ +public: + explicit InputConfigurator(std::shared_ptr<CursorController> cursor_controller); + + void configure(IInputHandler &input_handler) override; + +private: + std::shared_ptr<CursorController> _cursor_controller; +}; + +#include "input_configurator.tpp" |