aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 07:57:24 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 07:57:24 +0100
commit73f8d5c558ebc0820ede241e64a876ff1c5ccefb (patch)
treeb3058fc92101a25245e554091e7a6b406372a988 /src/crepe/system/InputSystem.h
parent7029aa426ad91b49459b47043b0d4329e4b0eaee (diff)
seperat ints converted to float
Diffstat (limited to 'src/crepe/system/InputSystem.h')
-rw-r--r--src/crepe/system/InputSystem.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/crepe/system/InputSystem.h b/src/crepe/system/InputSystem.h
index 5da8f32..3703635 100644
--- a/src/crepe/system/InputSystem.h
+++ b/src/crepe/system/InputSystem.h
@@ -39,7 +39,7 @@ private:
MouseButton last_mouse_button = MouseButton::NONE;
//! The maximum allowable distance between mouse down and mouse up to register as a click. This can be changed using the Config.
- int click_tolerance = Config::get_instance().click_tolerance.tolerance;
+ int click_tolerance = Config::get_instance().input.click_tolerance;
/**
* \brief Handles the mouse click event.
@@ -49,8 +49,7 @@ private:
*
* This method processes the mouse click event and triggers the corresponding button action.
*/
- void handle_click(const MouseButton & mouse_button, const int world_mouse_x,
- const int world_mouse_y);
+ void handle_click(const MouseButton & mouse_button,const ivec2& mouse_pos);
/**
* \brief Handles the mouse movement event.
@@ -60,8 +59,7 @@ private:
*
* This method processes the mouse movement event and updates the button hover state.
*/
- void handle_move(const SDLContext::EventData & event_data, const int world_mouse_x,
- const int world_mouse_y);
+ void handle_move(const SDLContext::EventData & event_data, const ivec2& mouse_pos);
/**
* \brief Checks if the mouse position is inside the bounds of the button.
@@ -71,7 +69,7 @@ private:
* \param transform The transform component of the button.
* \return True if the mouse is inside the button, false otherwise.
*/
- bool is_mouse_inside_button(const int world_mouse_x, const int world_mouse_y,
+ bool is_mouse_inside_button(const ivec2& mouse_pos,
const Button & button, const Transform & transform);
/**