ui id strategies, display and hash string

This commit is contained in:
Krzosa Karol
2025-01-11 12:58:28 +01:00
parent e8c8c1bf5c
commit b81297450b
2 changed files with 46 additions and 15 deletions

View File

@@ -46,6 +46,7 @@ fn b32 app_update(app_frame_t *frame) {
assert(frame->first_event);
for (app_event_t *ev = frame->first_event; ev; ev = ev->next) {
defer_block(ui_begin_build(UI_CODE_LOC, ev), ui_end_build()) {
defer_block(ui_push_list_container(UI_CODE_LOC), ui_pop_parent()) {
@@ -55,15 +56,15 @@ fn b32 app_update(app_frame_t *frame) {
ui_label(UI_CODE_LOC, "y: f64 = value");
ui_label(UI_CODE_LOC, "z: f64 = value");
}
defer_if (ui_push_exp(UI_CODE_LOC, "inner_pos: v2f64_t").clicked, ui_pop_exp()) {
ui_label(UI_CODE_LOC, "x: f64 = value");
ui_label(UI_CODE_LOC, "y: f64 = value");
}
ui_label(UI_CODE_LOC, "kind: app_event_kind_t = value");
ui_label(UI_CODE_LOC, "ctrl: b8 = value");
ui_label(UI_CODE_LOC, "shift: b8 = value");
defer_if (ui_push_exp(UI_CODE_LOC, "pos: v2f64_t").clicked, ui_pop_exp()) {
defer_if (ui_push_exp(UI_CODE_LOC, "inner_pos: v2f64_t").clicked, ui_pop_exp()) {
defer_if (ui_push_exp(UI_CODE_LOC, "inner_pos: v2f64_t##asd").clicked, ui_pop_exp()) {
ui_label(UI_CODE_LOC, "x: f64 = value");
ui_label(UI_CODE_LOC, "y: f64 = value");
}
defer_if (ui_push_exp(UI_CODE_LOC, "inner_pos: v2f64_t##qwe").clicked, ui_pop_exp()) {
ui_label(UI_CODE_LOC, "x: f64 = value");
ui_label(UI_CODE_LOC, "y: f64 = value");