aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:48:50 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:48:50 +0100
commit7c76d1743d5b0c3cf6eb05076fae88e948f3e22f (patch)
tree247d7739d7113cd0319d7b2949940abedc0be14b /src/crepe/system
parenta3e418c1a48a057d82fc3faf927ebf1cd3da7227 (diff)
make format
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/InputSystem.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index 34aad06..60daa55 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -158,8 +158,10 @@ void InputSystem::handle_move(const EventData & event_data, const vec2 & mouse_p
for (Button & button : buttons) {
if (!button.active) continue;
- Metadata & metadata = mgr.get_components_by_id<Metadata>(button.game_object_id).front();
- Transform & transform = mgr.get_components_by_id<Transform>(button.game_object_id).front();
+ Metadata & metadata
+ = mgr.get_components_by_id<Metadata>(button.game_object_id).front();
+ Transform & transform
+ = mgr.get_components_by_id<Transform>(button.game_object_id).front();
bool was_hovering = button.hover;
if (this->is_mouse_inside_button(mouse_pos, button, transform)) {
button.hover = true;
@@ -182,8 +184,10 @@ void InputSystem::handle_click(const MouseButton & mouse_button, const vec2 & mo
for (Button & button : buttons) {
if (!button.active) continue;
- Metadata & metadata = mgr.get_components_by_id<Metadata>(button.game_object_id).front();
- Transform & transform = mgr.get_components_by_id<Transform>(button.game_object_id).front();
+ Metadata & metadata
+ = mgr.get_components_by_id<Metadata>(button.game_object_id).front();
+ Transform & transform
+ = mgr.get_components_by_id<Transform>(button.game_object_id).front();
if (this->is_mouse_inside_button(mouse_pos, button, transform)) {
event_mgr.trigger_event<ButtonPressEvent>(metadata);