aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-20 12:48:46 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-20 12:48:46 +0100
commit43c6971591aaff8ada4adc1b1b4146b19d43f8e9 (patch)
tree8f405ec11d3e7275ea29d1aaf045fd7e70a4dcfb /src/crepe/system/InputSystem.cpp
parent5537096ea31e778e1604c87f2032168cfc2da22b (diff)
parent49e7d902ec2b6f509ab79994e7e2626f4bbbccf2 (diff)
merge master
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
-rw-r--r--src/crepe/system/InputSystem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index 858a645..8e9f763 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -171,12 +171,12 @@ void InputSystem::handle_move(const EventData & event_data, const vec2 & mouse_p
if (this->is_mouse_inside_button(mouse_pos, button, transform, cam_transform)) {
button.hover = true;
if (!was_hovering) {
- event_mgr.trigger_event<ButtonEnterEvent>(metadata);
+ event_mgr.trigger_event<ButtonEnterEvent>(metadata, metadata.game_object_id);
}
} else {
button.hover = false;
if (was_hovering) {
- event_mgr.trigger_event<ButtonExitEvent>(metadata);
+ event_mgr.trigger_event<ButtonExitEvent>(metadata, metadata.game_object_id);
}
}
}
@@ -196,7 +196,7 @@ void InputSystem::handle_click(const MouseButton & mouse_button, const vec2 & mo
const Transform & transform
= mgr.get_components_by_id<Transform>(button.game_object_id).front();
if (this->is_mouse_inside_button(mouse_pos, button, transform, cam_transform)) {
- event_mgr.trigger_event<ButtonPressEvent>(metadata);
+ event_mgr.trigger_event<ButtonPressEvent>(metadata, metadata.game_object_id);
}
}
}