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.cpp10
1 files changed, 10 insertions, 0 deletions
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<pke_ui_box_instance_buffer_item> &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: