UI module

resize

procedureextensionexperimentalsince 0.31.0Source

Change the logical size of the window a UI draws into.

Example↗
ui := headless();
defer free_ui(*ui);
resize(*ui, 400, 300);
assert(ui.size.x == 400 && ui.size.y == 300);
resize :: (ui: *UI_State, width: float, height: float)

Change the logical size of the window a UI draws into.

Parameters

ui: *UI_State
the UI to resize.
width: float
the new width in points.
height: float
the new height in points.
Example↗
ui := headless();
defer free_ui(*ui);
resize(*ui, 400, 300);
assert(ui.size.x == 400 && ui.size.y == 300);

See also