UI module

set_theme

procedureextensionexperimentalsince 0.31.0Source

Replace the theme of the UI being built.

Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
custom := default_theme();
custom.accent = hex(0xFF5500);
set_theme(custom);
assert(theme().accent == custom.accent);
pop_ui();
set_theme :: (theme: Theme)

Replace the theme of the UI being built.

Parameters

theme: Theme
the theme to use from now on.
Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
custom := default_theme();
custom.accent = hex(0xFF5500);
set_theme(custom);
assert(theme().accent == custom.accent);
pop_ui();

See also