comparison src/core/button.c @ 115:3bd0d3a39e30

core: implement checkbox, closes #2486
author David Demelier <markand@malikania.fr>
date Sun, 12 Jul 2020 09:44:27 +0200
parents ed1a6bb02a78
children
comparison
equal deleted inserted replaced
114:bf7500aea454 115:3bd0d3a39e30
38 button_handle(struct button *button, const union event *ev) 38 button_handle(struct button *button, const union event *ev)
39 { 39 {
40 assert(button); 40 assert(button);
41 assert(ev); 41 assert(ev);
42 42
43
44 switch (ev->type) { 43 switch (ev->type) {
45 case EVENT_CLICKDOWN: 44 case EVENT_CLICKDOWN:
46 if (is_boxed(button, &ev->click)) 45 if (is_boxed(button, &ev->click))
47 button->state = BUTTON_STATE_PRESSED; 46 button->state = BUTTON_STATE_PRESSED;
48 break; 47 break;