UI module

begin_frame

procedureextensionexperimentalsince 0.31.0Source

Start a frame: reset the per-frame arena, clear the display list and open the root container.

Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
begin_frame(*ui);
label("hello");
end_frame(*ui);
pop_ui();
assert(find_role(*ui, .TEXT).text == "hello");
begin_frame :: (ui: *UI_State)

Start a frame: reset the per-frame arena, clear the display list and open the root container.

Parameters

ui: *UI_State
the UI to start a frame on.
Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
begin_frame(*ui);
label("hello");
end_frame(*ui);
pop_ui();
assert(find_role(*ui, .TEXT).text == "hello");

See also