aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-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;