diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-05 13:54:01 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-05 13:54:01 +0100 |
commit | 16fda1ef8da96c44cec20225cc4427d8eec52827 (patch) | |
tree | 87079b4d35fadcb6fb00426f07272c772f821ca4 /src/crepe/system/InputSystem.cpp | |
parent | 5c7d01c49081e0127f00116a7ff174a79c6325d5 (diff) |
feedback changes
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
-rw-r--r-- | src/crepe/system/InputSystem.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp index d24a33d..4a7f115 100644 --- a/src/crepe/system/InputSystem.cpp +++ b/src/crepe/system/InputSystem.cpp @@ -31,8 +31,8 @@ void InputSystem::update() { = cam_transform.position.y + current_cam.offset.y - (current_cam.viewport_size.y / 2); for (const SDLContext::EventData & event : event_list) { - int world_mouse_x = event.mouse_position.first + camera_origin_x; - int world_mouse_y = event.mouse_position.second + camera_origin_y; + int world_mouse_x = event.mouse_position.x + camera_origin_x; + int world_mouse_y = event.mouse_position.y + camera_origin_y; // check if the mouse is within the viewport bool mouse_in_viewport = !(world_mouse_x < camera_origin_x @@ -96,8 +96,8 @@ void InputSystem::update() { event_mgr.queue_event<MouseMoveEvent>(MouseMoveEvent{ .mouse_x = world_mouse_x, .mouse_y = world_mouse_y, - .delta_x = event.rel_mouse_move.first, - .delta_y = event.rel_mouse_move.second, + .delta_x = event.rel_mouse_move.x, + .delta_y = event.rel_mouse_move.y, }); this->handle_move(event, world_mouse_x, world_mouse_y); break; |