aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 09:41:38 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 09:41:38 +0100
commit1ab941a37e16c9b16a06f6012b798bfb44120b79 (patch)
tree157f8320da73a522f44c4a34cc1e13869668f941 /src
parent77be74d880675c548417c7ff5af17e1785c62e05 (diff)
parentd3753404cdf58e529865782e7e3679aadb5bc18f (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/gameloop
Diffstat (limited to 'src')
-rw-r--r--src/test/InputTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp
index bf08a04..4826dc2 100644
--- a/src/test/InputTest.cpp
+++ b/src/test/InputTest.cpp
@@ -60,7 +60,7 @@ protected:
TEST_F(InputTest, MouseDown) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool mouse_triggered = false;
EventHandler<MousePressEvent> on_mouse_down = [&](const MousePressEvent & event) {
@@ -90,7 +90,7 @@ TEST_F(InputTest, MouseDown) {
TEST_F(InputTest, MouseUp) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool function_triggered = false;
EventHandler<MouseReleaseEvent> on_mouse_release = [&](const MouseReleaseEvent & e) {
@@ -118,7 +118,7 @@ TEST_F(InputTest, MouseUp) {
TEST_F(InputTest, MouseMove) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool function_triggered = false;
EventHandler<MouseMoveEvent> on_mouse_move = [&](const MouseMoveEvent & e) {
@@ -148,7 +148,7 @@ TEST_F(InputTest, MouseMove) {
TEST_F(InputTest, KeyDown) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool function_triggered = false;
@@ -179,7 +179,7 @@ TEST_F(InputTest, KeyDown) {
TEST_F(InputTest, KeyUp) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool function_triggered = false;
EventHandler<KeyReleaseEvent> on_key_release = [&](const KeyReleaseEvent & event) {
@@ -203,7 +203,7 @@ TEST_F(InputTest, KeyUp) {
TEST_F(InputTest, MouseClick) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
bool on_click_triggered = false;
EventHandler<MouseClickEvent> on_mouse_click = [&](const MouseClickEvent & event) {
@@ -224,7 +224,7 @@ TEST_F(InputTest, MouseClick) {
TEST_F(InputTest, testButtonClick) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
GameObject button_obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1);
bool button_clicked = false;
@@ -251,7 +251,7 @@ TEST_F(InputTest, testButtonClick) {
TEST_F(InputTest, testButtonHover) {
GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{100, 100}, vec2{100, 100}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2{0, 0}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
camera.active = true;
GameObject button_obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1);
bool button_clicked = false;