UI module

reset_draw_list

procedureextensionexperimentalsince 0.31.0Source

Empty the display list for a new frame.

Example↗
ui := headless();
defer free_ui(*ui);
draw_rect(*ui, .{ 0, 0, 10, 10 }, rgb(255, 0, 0));
reset_draw_list(*ui.draw);
assert(ui.draw.cmds.count == 0);
reset_draw_list :: (list: *Draw_List)

Empty the display list for a new frame.

Parameters

list: *Draw_List
the display list to empty. Its memory is kept.
Example↗
ui := headless();
defer free_ui(*ui);
draw_rect(*ui, .{ 0, 0, 10, 10 }, rgb(255, 0, 0));
reset_draw_list(*ui.draw);
assert(ui.draw.cmds.count == 0);

See also