GWIN checkbox fix
This commit is contained in:
parent
5b7ac841f3
commit
809b8ccc60
@ -38,7 +38,6 @@
|
|||||||
typedef struct GEventGWinCheckbox_t {
|
typedef struct GEventGWinCheckbox_t {
|
||||||
GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX)
|
GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX)
|
||||||
GHandle checkbox; // The checkbox that has been depressed (actually triggered on release)
|
GHandle checkbox; // The checkbox that has been depressed (actually triggered on release)
|
||||||
bool_t state; // The state of the checkbox (selected or unselected)
|
|
||||||
} GEventGWinCheckbox;
|
} GEventGWinCheckbox;
|
||||||
|
|
||||||
typedef enum GCheckboxShape_e {
|
typedef enum GCheckboxShape_e {
|
||||||
|
@ -74,12 +74,23 @@ static void gwinCheckboxCallback(void *param, GEvent *pe) {
|
|||||||
|
|
||||||
gwinCheckboxDraw((GHandle)param);
|
gwinCheckboxDraw((GHandle)param);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
#endif /* GFX_USE_GINPUT && GINPUT_NEED_MOUSE */
|
#endif /* GFX_USE_GINPUT && GINPUT_NEED_MOUSE */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger a GWIN checkbox event
|
||||||
|
psl = 0;
|
||||||
|
while ((psl = geventGetSourceListener(gsh, psl))) {
|
||||||
|
if (!(pe = geventGetEventBuffer(psl)))
|
||||||
|
continue;
|
||||||
|
pbe->type = GEVENT_GWIN_CHECKBOX;
|
||||||
|
pbe->checkbox = gh;
|
||||||
|
geventSendEvent(psl);
|
||||||
|
}
|
||||||
|
|
||||||
#undef gh
|
#undef gh
|
||||||
#undef pbe
|
#undef pbe
|
||||||
#undef pme
|
#undef pme
|
||||||
|
Loading…
Reference in New Issue
Block a user