diff options
Diffstat (limited to 'src/crepe/system/InputSystem.h')
-rw-r--r-- | src/crepe/system/InputSystem.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crepe/system/InputSystem.h b/src/crepe/system/InputSystem.h index c50d928..231aa45 100644 --- a/src/crepe/system/InputSystem.h +++ b/src/crepe/system/InputSystem.h @@ -7,8 +7,13 @@ namespace crepe { class InputSystem : public System { public: using System::System; - InputSystem(ComponentManager & component_manager); void update() override; + void process_events(); + +private: + std::pair<int, int> last_mouse_down_position{-1, -1}; + MouseButton last_mouse_button = MouseButton::NONE; + const int click_tolerance = 5; bool handle_click(const MouseClickEvent &event); bool handle_move(const MouseMoveEvent &event); bool handle_key_press(const KeyPressEvent &event); |