diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-06 10:50:50 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-06 10:50:50 +0100 |
commit | 2b187c58f192cad0f2f22d5f7733e54d53f34e19 (patch) | |
tree | ffc027d152fb751773a22b447e6db34b503e4439 | |
parent | 04a37c297f9f4e22adcee1f4a3cc73cde4c3c7b0 (diff) | |
parent | 92dfde9a56f5a607269e8908002a72bec85357bd (diff) |
Merge branch 'wouter/buttonScale' of github.com:lonkaars/crepe into jaro/main-menu
-rw-r--r-- | src/crepe/system/InputSystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp index 91c9c64..d9c97a3 100644 --- a/src/crepe/system/InputSystem.cpp +++ b/src/crepe/system/InputSystem.cpp @@ -216,8 +216,8 @@ bool InputSystem::is_mouse_inside_button( if (!button.data.world_space) { actual_pos += cam_transform.position; } - vec2 half_dimensions = button.dimensions / 2; - + vec2 half_dimensions = button.dimensions * transform.scale / 2; + return mouse_pos.x >= actual_pos.x - half_dimensions.x && mouse_pos.x <= actual_pos.x + half_dimensions.x && mouse_pos.y >= actual_pos.y - half_dimensions.y |