goome

Checkboxes and toggles

checkboxes, toggles and radio buttons in the dark theme

int grid = 1, notify = 0, wifi = 1, size = 1;
goome_ui_checkbox(u, "Show grid", &grid);
goome_ui_same_line(u);
goome_ui_checkbox(u, "Notifications", &notify);
goome_ui_toggle(u, "Wi-Fi", &wifi);
goome_ui_radio(u, "Small", &size, 0);
goome_ui_same_line(u);
goome_ui_radio(u, "Medium", &size, 1);
goome_ui_same_line(u);
goome_ui_radio(u, "Large", &size, 2);

Checkboxes and toggles flip an int between 0 and 1 and return 1 the frame it changed. A toggle is a checkbox that looks like a switch.

Radios share one int. Each sets it to its own value when clicked and shows picked while the int equals it.

Light theme:

the same switches in the light theme

Edit this page on GitHub