|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: gui_checkbox.c,v 1.1 2013/03/10 23:32:28 steffen Exp $ */
|
|
|
|
|
/* $Id: gui_checkbox.c,v 1.2 2013/03/29 00:14:55 steffen Exp $ */
|
|
|
|
|
/***************************************************************************
|
|
|
|
|
* gui_checkbox.c
|
|
|
|
|
*
|
|
|
|
|
@ -58,8 +58,8 @@ GUIItem *gui_checkbox_new (char *text, int initialvalue, int x, int y) {
|
|
|
|
|
else strncpy (checkbox->text, text, GUI_TEXTLEN);
|
|
|
|
|
item->x = x;
|
|
|
|
|
item->y = y;
|
|
|
|
|
item->w = x + 15;
|
|
|
|
|
item->y = y + 15;
|
|
|
|
|
item->w = 15;
|
|
|
|
|
item->h = 15;
|
|
|
|
|
|
|
|
|
|
checkbox->checked = initialvalue;
|
|
|
|
|
checkbox->callback_changed = NULL;
|
|
|
|
|
@ -78,6 +78,7 @@ int gui_checkbox_event (GUIItem *item, GUIEvent *event) {
|
|
|
|
|
errorexit (-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
d_printf ("checkbox:%s %d,%d,%d,%d %d,%d", checkbox->text, item->x, item->y, item->w, item->h, event->mousepos.x, event->mousepos.y);
|
|
|
|
|
if (event->event == EGUI_MOUSEPRESSED) {
|
|
|
|
|
checkbox->checked = !checkbox->checked;
|
|
|
|
|
if (checkbox->callback_changed != NULL) {
|
|
|
|
|
|