aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-06 10:50:50 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-06 10:50:50 +0100
commit2b187c58f192cad0f2f22d5f7733e54d53f34e19 (patch)
treeffc027d152fb751773a22b447e6db34b503e4439
parent04a37c297f9f4e22adcee1f4a3cc73cde4c3c7b0 (diff)
parent92dfde9a56f5a607269e8908002a72bec85357bd (diff)
Merge branch 'wouter/buttonScale' of github.com:lonkaars/crepe into jaro/main-menu
-rw-r--r--src/crepe/system/InputSystem.cpp4
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