diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-06-16 09:51:00 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-06-16 09:51:00 -0400 |
| commit | 66ebed74456f76277597b3b07f3e67cc45388ece (patch) | |
| tree | 5e7d0c429867a294bca78269124954ce0a4823fc /src/static-ui.hpp | |
| parent | c1ad6ceeb301bc1f2a4f850e08587748a6d9107b (diff) | |
pke: update FontRender text (editor: for ui-box)
Diffstat (limited to 'src/static-ui.hpp')
| -rw-r--r-- | src/static-ui.hpp | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/src/static-ui.hpp b/src/static-ui.hpp index f0e5c3c..6d5c61c 100644 --- a/src/static-ui.hpp +++ b/src/static-ui.hpp @@ -22,43 +22,43 @@ TypeSafeInt_H(PKE_UI_BOX_TYPE, uint8_t, 0xFF); TypeSafeInt_H(PKE_UI_BOX_FLAG, uint64_t, 0xFFFFFFFFFFFFFFFF); // layouts -constexpr PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_STANDARD - = PKE_UI_BOX_TYPE(000); +const PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_STANDARD + = PKE_UI_BOX_TYPE(000); // TODO columns, rows, tabs, etc // special (content) -constexpr PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_TEXT - = PKE_UI_BOX_TYPE(050); +const PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_TEXT + = PKE_UI_BOX_TYPE(050); // TODO image, render target, etc // inputs -constexpr PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_INPUT_TEXT - = PKE_UI_BOX_TYPE(100); +const PKE_UI_BOX_TYPE PKE_UI_BOX_TYPE_INPUT_TEXT + = PKE_UI_BOX_TYPE(100); // TODO multi-line text, scalar, float, slider, button, etc -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_NONE - = PKE_UI_BOX_FLAG(0); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_NONE + = PKE_UI_BOX_FLAG(0); // [00-04] position type // exact screen coordinates -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_FLEX - = PKE_UI_BOX_FLAG((1 << 0)); -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC - = PKE_UI_BOX_FLAG((1 << 1)); -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC - = PKE_UI_BOX_FLAG((1 << 2)); -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_ALL - = PKE_UI_BOX_FLAG((1 << 0) | (1 << 1) | (1 << 2)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_FLEX + = PKE_UI_BOX_FLAG((1 << 0)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC + = PKE_UI_BOX_FLAG((1 << 1)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC + = PKE_UI_BOX_FLAG((1 << 2)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_POSITION_TYPE_ALL + = PKE_UI_BOX_FLAG((1 << 0) | (1 << 1) | (1 << 2)); // [05-06] center -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_HORIZONTAL - = PKE_UI_BOX_FLAG((1 << 5)); -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_VERTICAL - = PKE_UI_BOX_FLAG((1 << 6)); -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_BOTH - = PKE_UI_BOX_FLAG((1 << 5) | (1 << 6)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_HORIZONTAL + = PKE_UI_BOX_FLAG((1 << 5)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_VERTICAL + = PKE_UI_BOX_FLAG((1 << 6)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_CENTER_BOTH + = PKE_UI_BOX_FLAG((1 << 5) | (1 << 6)); // [07-09] visibility -constexpr PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_VISIBILITY_INVISIBLE - = PKE_UI_BOX_FLAG((1 << 7)); +const PKE_UI_BOX_FLAG PKE_UI_BOX_FLAG_VISIBILITY_INVISIBLE + = PKE_UI_BOX_FLAG((1 << 7)); // [10-??] typedef uint16_t pke_ui_box_count_T; @@ -113,6 +113,7 @@ void pke_ui_init(); void pke_ui_init_bindings(); void pke_ui_tick(double delta); void pke_ui_teardown(); +void pke_ui_force_recalc(); pke_ui_box **pke_ui_get_root_boxes(pke_ui_box_count_T *count); |
