From 154436ab88925540f86f43c0ac885c080949aa9b Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 19 Aug 2025 13:51:40 -0400 Subject: pke: ui box type button image --- tests/pke-test-static-ui.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/pke-test-static-ui.cpp b/tests/pke-test-static-ui.cpp index 2eeed66..ca696fc 100644 --- a/tests/pke-test-static-ui.cpp +++ b/tests/pke-test-static-ui.cpp @@ -40,6 +40,7 @@ void pke_test_static_ui_teardown() { // test static int pke_test_static_ui_000() { pk_arr_t arr{}; + pk_arr_t> txtr_arr{}; float calculated_offset; uint8_t err_index = 0; @@ -59,8 +60,8 @@ 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); + pke_ui_calc_px(arr, txtr_arr, nullptr, ui_box); + pke_ui_recalc_sizes_recursive(arr, txtr_arr, ui_box); PKE_TEST_ASSERT(ui_box->internal.parent == nullptr, err_index); PKE_TEST_ASSERT(ui_box->internal.h_children == 1, err_index); @@ -84,6 +85,7 @@ int pke_test_static_ui_000() { // test dynamic int pke_test_static_ui_100() { pk_arr_t arr{}; + pk_arr_t> txtr_arr{}; bool b; float unit; float calculated_offset_x, calculated_offset_y; @@ -111,8 +113,8 @@ int pke_test_static_ui_100() { calculated_offset_y = (unit * 8) - (built_in_offset * 2); // padded parent 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); + pke_ui_calc_px(arr, txtr_arr, nullptr, ui_box); + pke_ui_recalc_sizes_recursive(arr, txtr_arr, ui_box); PKE_TEST_ASSERT(ui_box->internal.parent == nullptr, err_index); PKE_TEST_ASSERT(ui_box->internal.h_children == 1, err_index); @@ -145,6 +147,7 @@ int pke_test_static_ui_100() { // test dynamic + static int pke_test_static_ui_200() { pk_arr_t arr{}; + pk_arr_t> txtr_arr{}; float unit; float calculated_offset_x, calculated_offset_y; uint8_t err_index = 0; @@ -169,8 +172,8 @@ int pke_test_static_ui_200() { unit = Extent.height * 0.1; calculated_offset_y = unit + 1 + built_in_offset; - pke_ui_calc_px(arr, nullptr, ui_box); - pke_ui_recalc_sizes_recursive(arr, ui_box); + pke_ui_calc_px(arr, txtr_arr, nullptr, ui_box); + pke_ui_recalc_sizes_recursive(arr, txtr_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