From 78f5d8cf644383adf20933ad64c160c07c2c54fb Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 13:17:16 +0100 Subject: refactor: improve input configuring structure --- src/commands/move_cursor.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/commands/move_cursor.hpp (limited to 'src/commands/move_cursor.hpp') diff --git a/src/commands/move_cursor.hpp b/src/commands/move_cursor.hpp new file mode 100644 index 0000000..14a87e0 --- /dev/null +++ b/src/commands/move_cursor.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "interfaces/command.hpp" +#include "interfaces/cursor.hpp" +#include "interfaces/scene.hpp" +#include "interfaces/window.hpp" + +#include "engine/data/vector2.hpp" + +#include + +class MoveCursorCommand : public ICommand +{ +public: + MoveCursorCommand(const Vector2 &direction, + const std::shared_ptr &cursor_controller, + const std::shared_ptr &scene, + const std::shared_ptr &window) noexcept; + + void execute() noexcept override; + +private: + Vector2 _direction; + const std::shared_ptr &_cursor_controller; + const std::shared_ptr &_scene; + const std::shared_ptr &_window; +}; -- cgit v1.2.3-18-g5258