From f99d6fd7226233c1f2e47c0f5f38737a72861fc9 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 30 Oct 2025 14:20:49 -0400 Subject: pke: add flags to FontRenderSettings --- src/static-ui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/static-ui.cpp') diff --git a/src/static-ui.cpp b/src/static-ui.cpp index 836966d..25c2514 100644 --- a/src/static-ui.cpp +++ b/src/static-ui.cpp @@ -385,12 +385,22 @@ bool pke_ui_calc_px(pk_arr_t &buffer, pk_arr_t< frs = FontType_GetFontRender(box->type_data->text.font_render_handle)->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)) { + frs.flags = FONT_RENDER_FLAG(FONT_RENDER_FLAG_T(frs.flags) | FONT_RENDER_FLAG_T(FONT_RENDER_FLAG_VISIBILITY_INVISIBLE)); + } 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); break; case PKE_UI_BOX_TYPE_BUTTON_TEXT: frs = FontType_GetFontRender(box->type_data->button_text.font_render_handle)->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)) { + frs.flags = FONT_RENDER_FLAG(FONT_RENDER_FLAG_T(frs.flags) | FONT_RENDER_FLAG_T(FONT_RENDER_FLAG_VISIBILITY_INVISIBLE)); + } 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); break; case PKE_UI_BOX_TYPE_BUTTON_IMAGE: -- cgit v1.2.3