aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 20:12:34 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 20:12:34 +0100
commit6454975779acb39d7d546e11855a07a952e68e5b (patch)
tree3c13741ebbeb36f4df85654b232dcfbce8c66e4b /src/test
parentb0a7296eb4319d123c88b34f162c28d0717c98e4 (diff)
loeks feedback changes
Diffstat (limited to 'src/test')
-rw-r--r--src/test/InputTest.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp
index 32111c0..f7d1059 100644
--- a/src/test/InputTest.cpp
+++ b/src/test/InputTest.cpp
@@ -119,8 +119,8 @@ TEST_F(InputTest, MouseMove) {
function_triggered = true;
EXPECT_EQ(e.mouse_x, 0);
EXPECT_EQ(e.mouse_y, 0);
- EXPECT_EQ(e.rel_x, 10);
- EXPECT_EQ(e.rel_y, 10);
+ EXPECT_EQ(e.delta_x , 10);
+ EXPECT_EQ(e.delta_y , 10);
return false;
};
event_manager.subscribe<MouseMoveEvent>(on_mouse_move);
@@ -223,7 +223,7 @@ TEST_F(InputTest, testButtonClick) {
GameObject button_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 = button_obj.add_component<Button>(100, 100, on_click, false);
+ auto & button = button_obj.add_component<Button>(vec2{100,100},vec2{0,0}, on_click, false);
bool hover = false;
button.active = true;
@@ -249,10 +249,8 @@ TEST_F(InputTest, testButtonHover) {
GameObject button_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 = button_obj.add_component<Button>(100, 100, on_click, false);
+ auto & button = button_obj.add_component<Button>(vec2{100,100},vec2{0,0}, on_click, false);
button.active = true;
- button.width = 100;
- button.height = 100;
button.is_pressed = false;
button.is_toggle = false;