From f7d860cee74ad3b94e0d15ea157783b7760f6d55 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 31 Jul 2025 15:15:16 -0400 Subject: pke-ui: detect mouse clicks, other small refactors --- tests/pke-test-static-ui.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/pke-test-static-ui.cpp') diff --git a/tests/pke-test-static-ui.cpp b/tests/pke-test-static-ui.cpp index a826587..2eeed66 100644 --- a/tests/pke-test-static-ui.cpp +++ b/tests/pke-test-static-ui.cpp @@ -4,6 +4,7 @@ #include "./pke-test-types.h" #include "ecs.hpp" +#include "player-input.hpp" #include "window.hpp" #include "vendor-glm-include.hpp" #include @@ -25,6 +26,7 @@ void pke_test_static_ui_setup() { Extent.height = 1080; pk_ev_init(nullptr); ECS_Init(); + pke_input_init(); pke_ui_init(); } @@ -32,6 +34,7 @@ void pke_test_static_ui_teardown() { pke_ui_teardown(); ECS_Teardown(); pk_ev_teardown(); + pke_input_teardown(); } // test static @@ -57,7 +60,7 @@ int pke_test_static_ui_000() { calculated_offset = ui_box->pos_top_left.x + c_ui_box->pos_top_left.x + built_in_offset; pke_ui_calc_px(arr, nullptr, ui_box); - pke_ui_recalc_sizes_recursive(arr, ui_box, 0); + pke_ui_recalc_sizes_recursive(arr, ui_box); PKE_TEST_ASSERT(ui_box->internal.parent == nullptr, err_index); PKE_TEST_ASSERT(ui_box->internal.h_children == 1, err_index); @@ -109,7 +112,7 @@ int pke_test_static_ui_100() { calculated_offset_y = (calculated_offset_y * 0.1) + unit + built_in_offset; pke_ui_calc_px(arr, nullptr, ui_box); - pke_ui_recalc_sizes_recursive(arr, ui_box, 0); + pke_ui_recalc_sizes_recursive(arr, ui_box); PKE_TEST_ASSERT(ui_box->internal.parent == nullptr, err_index); PKE_TEST_ASSERT(ui_box->internal.h_children == 1, err_index); @@ -167,7 +170,7 @@ int pke_test_static_ui_200() { calculated_offset_y = unit + 1 + built_in_offset; pke_ui_calc_px(arr, nullptr, ui_box); - pke_ui_recalc_sizes_recursive(arr, ui_box, 0); + pke_ui_recalc_sizes_recursive(arr, ui_box); PKE_TEST_ASSERT(ui_box->internal.parent == nullptr, err_index); PKE_TEST_ASSERT(ui_box->internal.h_children == 1, err_index); -- cgit v1.2.3