summaryrefslogtreecommitdiff
path: root/src/static-ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/static-ui.cpp')
-rw-r--r--src/static-ui.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/static-ui.cpp b/src/static-ui.cpp
index 505f4bc..8addb7e 100644
--- a/src/static-ui.cpp
+++ b/src/static-ui.cpp
@@ -396,7 +396,7 @@ bool pke_ui_calc_px(pk_arr_t<pke_ui_box_instance_buffer_item> &buffer, pk_arr_t<
FontRenderSettings frs;
switch (box->type) {
case PKE_UI_BOX_TYPE_TEXT:
- frs = FontType_GetFontRender(box->type_data->text.font_render_handle)->settings;
+ frs = FontType_GetFontRender(box->type_data->text.font_type_render)->settings;
frs.surface_area_pos = box->internal.px_corner;
frs.surface_area_size = box->internal.px_size;
if (PK_HAS_FLAG(box->flags, PKE_UI_BOX_FLAG_VISIBILITY_INVISIBLE)) {
@@ -404,10 +404,10 @@ bool pke_ui_calc_px(pk_arr_t<pke_ui_box_instance_buffer_item> &buffer, pk_arr_t<
} else {
frs.flags = FONT_RENDER_FLAG(FONT_RENDER_FLAG_T(frs.flags) & (~FONT_RENDER_FLAG_T(FONT_RENDER_FLAG_VISIBILITY_INVISIBLE)));
}
- FontType_UpdateStringRender(box->type_data->text.font_render_handle, &frs);
+ FontType_UpdateStringRender(box->type_data->text.font_type_render, &frs);
break;
case PKE_UI_BOX_TYPE_BUTTON_TEXT:
- frs = FontType_GetFontRender(box->type_data->button_text.font_render_handle)->settings;
+ frs = FontType_GetFontRender(box->type_data->button_text.font_type_render)->settings;
frs.surface_area_pos = box->internal.px_corner;
frs.surface_area_size = box->internal.px_size;
if (PK_HAS_FLAG(box->flags, PKE_UI_BOX_FLAG_VISIBILITY_INVISIBLE)) {
@@ -415,7 +415,7 @@ bool pke_ui_calc_px(pk_arr_t<pke_ui_box_instance_buffer_item> &buffer, pk_arr_t<
} else {
frs.flags = FONT_RENDER_FLAG(FONT_RENDER_FLAG_T(frs.flags) & (~FONT_RENDER_FLAG_T(FONT_RENDER_FLAG_VISIBILITY_INVISIBLE)));
}
- FontType_UpdateStringRender(box->type_data->button_text.font_render_handle, &frs);
+ FontType_UpdateStringRender(box->type_data->button_text.font_type_render, &frs);
break;
case PKE_UI_BOX_TYPE_BUTTON_IMAGE:
break;
@@ -749,15 +749,15 @@ void pke_ui_teardown_box_recursive(pke_ui_box *box, uint8_t depth) {
// If correctly parented, this is unnecessary, but serialization does
// not construct text boxes in this way.
// Handle to avoid memory leaks.
- fr = FontType_GetFontRender(box->type_data->text.font_render_handle);
+ fr = FontType_GetFontRender(box->type_data->text.font_type_render);
if (fr != nullptr && fr->parentHandle != box->handle) {
- FontType_RemoveStringRender(box->type_data->text.font_render_handle);
+ FontType_RemoveStringRender(box->type_data->text.font_type_render);
}
break;
case PKE_UI_BOX_TYPE_BUTTON_TEXT:
- fr = FontType_GetFontRender(box->type_data->button_text.font_render_handle);
+ fr = FontType_GetFontRender(box->type_data->button_text.font_type_render);
if (fr != nullptr && fr->parentHandle != box->handle) {
- FontType_RemoveStringRender(box->type_data->button_text.font_render_handle);
+ FontType_RemoveStringRender(box->type_data->button_text.font_type_render);
}
break;
case PKE_UI_BOX_TYPE_BUTTON_IMAGE:
@@ -887,7 +887,7 @@ void pke_ui_internal_new_typed_box(pke_ui_box *box, const PKE_UI_BOX_TYPE type)
break;
case PKE_UI_BOX_TYPE_BUTTON_TEXT:
tp_data = pk_new<pke_ui_box_type_data>(pke_ui_master.bkt);
- tp_data->button_text.font_render_handle = FontRenderHandle_MAX;
+ tp_data->button_text.font_type_render = FontTypeRender_MAX;
pressed_ev = ECS_CreateEv(box, pk_uuid_max);
tp_data->button_text.pke_event_handle = pressed_ev->pke_event_handle;
tp_data->button_text.ev_id = pressed_ev->ev_id;