first checkbox
This commit is contained in:
parent
196a2474fd
commit
14359a9b7e
@ -112,11 +112,13 @@ fn void! Ctx.checkbox(&ctx, String label, String description, Point off, bool* s
|
|||||||
// no interaction should occur so just return
|
// no interaction should occur so just return
|
||||||
if (elem.bounds.is_null()) return;
|
if (elem.bounds.is_null()) return;
|
||||||
|
|
||||||
Color col = 0x0000ffffu.to_rgba();
|
|
||||||
elem.events = ctx.get_elem_events(elem);
|
elem.events = ctx.get_elem_events(elem);
|
||||||
if (state) {
|
if (elem.events.mouse_hover && elem.events.mouse_release) *state = !(*state);
|
||||||
|
|
||||||
|
Color col;
|
||||||
|
if (*state) {
|
||||||
col = 0xff0000ffu.to_rgba();
|
col = 0xff0000ffu.to_rgba();
|
||||||
} else if (ctx.elem_focus(elem) || elem.events.mouse_hover) {
|
} else {
|
||||||
col = 0xff00ffffu.to_rgba();
|
col = 0xff00ffffu.to_rgba();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user