summaryrefslogtreecommitdiff
path: root/tests/pke-test-static-ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pke-test-static-ui.cpp')
-rw-r--r--tests/pke-test-static-ui.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/pke-test-static-ui.cpp b/tests/pke-test-static-ui.cpp
index 1e11d97..9a5fb71 100644
--- a/tests/pke-test-static-ui.cpp
+++ b/tests/pke-test-static-ui.cpp
@@ -41,19 +41,19 @@ int pke_test_static_ui_000() {
pke_ui_box *ui_box = pke_ui_box_new_root();
ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC;
- ui_box->pos_top_left_x = 10;
- ui_box->pos_top_left_y = 10;
- ui_box->max_width = 500;
- ui_box->max_height = 500;
+ ui_box->pos_top_left.x = 10;
+ ui_box->pos_top_left.y = 10;
+ ui_box->max_size.x = 500;
+ ui_box->max_size.y = 500;
pke_ui_box *c_ui_box = pke_ui_box_new_child(ui_box);
c_ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC;
- c_ui_box->pos_top_left_x = 10;
- c_ui_box->pos_top_left_y = 10;
- c_ui_box->max_width = 100;
- c_ui_box->max_height = 100;
+ c_ui_box->pos_top_left.x = 10;
+ c_ui_box->pos_top_left.y = 10;
+ c_ui_box->max_size.x = 100;
+ c_ui_box->max_size.y = 100;
- calculated_offset = ui_box->pos_top_left_x + c_ui_box->pos_top_left_x + built_in_offset;
+ 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);
@@ -87,17 +87,17 @@ int pke_test_static_ui_100() {
pke_ui_box *ui_box = pke_ui_box_new_root();
ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC;
- ui_box->pos_top_left_x = 0.1;
- ui_box->pos_top_left_y = 0.1;
- ui_box->max_width = 0.8;
- ui_box->max_height = 0.8;
+ ui_box->pos_top_left.x = 0.1;
+ ui_box->pos_top_left.y = 0.1;
+ ui_box->max_size.x = 0.8;
+ ui_box->max_size.y = 0.8;
pke_ui_box *c_ui_box = pke_ui_box_new_child(ui_box);
c_ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC;
- c_ui_box->pos_top_left_x = 0.1;
- c_ui_box->pos_top_left_y = 0.1;
- c_ui_box->max_width = 0.8;
- c_ui_box->max_height = 0.8;
+ c_ui_box->pos_top_left.x = 0.1;
+ c_ui_box->pos_top_left.y = 0.1;
+ c_ui_box->max_size.x = 0.8;
+ c_ui_box->max_size.y = 0.8;
unit = Extent.width * 0.1;
calculated_offset_x = (unit * 8) - (built_in_offset * 2); // padded parent
@@ -147,17 +147,17 @@ int pke_test_static_ui_200() {
pke_ui_box *ui_box = pke_ui_box_new_root();
ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC;
- ui_box->pos_top_left_x = 0.1;
- ui_box->pos_top_left_y = 0.1;
- ui_box->max_width = 0.8;
- ui_box->max_height = 0.8;
+ ui_box->pos_top_left.x = 0.1;
+ ui_box->pos_top_left.y = 0.1;
+ ui_box->max_size.x = 0.8;
+ ui_box->max_size.y = 0.8;
pke_ui_box *c_ui_box = pke_ui_box_new_child(ui_box);
c_ui_box->flags = PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC;
- c_ui_box->pos_top_left_x = 1;
- c_ui_box->pos_top_left_y = 1;
- c_ui_box->max_width = 300;
- c_ui_box->max_height = 300;
+ c_ui_box->pos_top_left.x = 1;
+ c_ui_box->pos_top_left.y = 1;
+ c_ui_box->max_size.x = 300;
+ c_ui_box->max_size.y = 300;
unit = Extent.width * 0.1;
calculated_offset_x = unit + 1 + built_in_offset;