diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
| commit | ef37d054dfe5812efa9eefb4b9b18621fdabac25 (patch) | |
| tree | 713042c875004da0058bf5813c4b2b736b6c4ed3 /src/static-ui.hpp | |
| parent | a066448effaa9a56c049136067a73ba0156f65d3 (diff) | |
pke: first-pass serializing ui and font renders
Diffstat (limited to 'src/static-ui.hpp')
| -rw-r--r-- | src/static-ui.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/static-ui.hpp b/src/static-ui.hpp index 95506d7..149d588 100644 --- a/src/static-ui.hpp +++ b/src/static-ui.hpp @@ -65,7 +65,7 @@ typedef uint16_t pke_ui_box_count_T; struct pke_ui_box; -struct pke_ui_box { +struct pke_ui_box : public Entity_Base { PKE_UI_BOX_FLAG flags; float pos_top_left_x, pos_top_left_y; float min_width, min_height; @@ -91,6 +91,7 @@ struct pke_ui_box { }; struct pke_ui_box_type_data_text { + pk_uuid font_render_uuid = pk_uuid_zed; FontRenderHandle font_render_handle; FontRenderSettings font_render_settings; }; @@ -112,8 +113,8 @@ void pke_ui_init_bindings(); void pke_ui_tick(double delta); void pke_ui_teardown(); -pke_ui_box *pke_ui_box_new_root(const PKE_UI_BOX_TYPE type = PKE_UI_BOX_TYPE_STANDARD); -pke_ui_box *pke_ui_box_new_child(pke_ui_box *parent, const PKE_UI_BOX_TYPE type = PKE_UI_BOX_TYPE_STANDARD); +pke_ui_box *pke_ui_box_new_root(const PKE_UI_BOX_TYPE type = PKE_UI_BOX_TYPE_STANDARD, pk_uuid uuid = pk_uuid_zed); +pke_ui_box *pke_ui_box_new_child(pke_ui_box *parent, const PKE_UI_BOX_TYPE type = PKE_UI_BOX_TYPE_STANDARD, pk_uuid uuid = pk_uuid_zed); #ifdef PKE_TEST_EXPOSE void pke_ui_calc_px(DynArray<pke_ui_box_instance_buffer_item> &buffer, pke_ui_flex_params *flex_params, pke_ui_box *box); |
