aboutsummaryrefslogtreecommitdiff
path: root/src/test/InputTest.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-28 09:02:02 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-28 09:02:02 +0100
commit34218886689a57004576486976038027732d8bcc (patch)
tree28eb5b594920fbb3c668564e01818bfa50b6fc56 /src/test/InputTest.cpp
parent570acb7e9258edcd6a06fff4dd2ce0ff12a3e873 (diff)
make format
Diffstat (limited to 'src/test/InputTest.cpp')
-rw-r--r--src/test/InputTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp
index 2467839..4f6077b 100644
--- a/src/test/InputTest.cpp
+++ b/src/test/InputTest.cpp
@@ -191,11 +191,11 @@ TEST_F(InputTest, testButtonClick) {
GameObject obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1);
bool button_clicked = false;
std::function<void()> on_click = [&]() { button_clicked = true; };
- auto & button = obj.add_component<Button>(100, 100,on_click,false);
-
+ auto & button = obj.add_component<Button>(100, 100, on_click, false);
+
bool hover = false;
button.active = true;
-
+
button.is_pressed = false;
button.is_toggle = false;
this->simulate_mouse_click(101, 101, SDL_BUTTON_LEFT);
@@ -213,7 +213,7 @@ TEST_F(InputTest, testButtonHover) {
GameObject obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1);
bool button_clicked = false;
std::function<void()> on_click = [&]() { button_clicked = true; };
- auto & button = obj.add_component<Button>(100, 100,on_click,false);
+ auto & button = obj.add_component<Button>(100, 100, on_click, false);
button.active = true;
button.width = 100;
button.height = 100;