Finish the frame: drop nodes nobody declared, lay the tree out and fix focus.
- ui: the UI whose frame is done.
ui := headless(.{ width = 200, height = 100 });
defer free_ui(*ui);
push_ui(*ui);
begin_frame(*ui);
button("OK");
end_frame(*ui);
pop_ui();
assert(find_label(*ui, "OK").rect.w > 0);end_frame :: (ui: *UI_State)
Finish the frame: drop nodes nobody declared, lay the tree out and fix focus.
Parameters
- ui: *UI_State
- the UI whose frame is done.
ui := headless(.{ width = 200, height = 100 });
defer free_ui(*ui);
push_ui(*ui);
begin_frame(*ui);
button("OK");
end_frame(*ui);
pop_ui();
assert(find_label(*ui, "OK").rect.w > 0);