master
steffen 13 years ago
parent bcac14b12f
commit fecfe775c2

@ -1,3 +1,4 @@
/* $id: Exp $ */
/*************************************************************************** /***************************************************************************
* gui.c * gui.c
* *
@ -201,41 +202,15 @@ int gui_event (GUIEvent event) {
/*************************************************************************** /***************************************************************************
* basic windows functions * basic windows functions
***************************************************************************/ ***************************************************************************/
void guiwindow_new (GUIWindow *win, int w, int h) { void guiwindow_new (GUIWindow *win, int w, int h, char *title) {
int i; int i;
for (i = 0; i < GUI_WIN_BUTTONS; i++) { for (i = 0; i < GUI_MAX_ITEM; i++) {
win->buttons[i].caption[0] = '\0'; win->items[i]->item = NULL;
win->buttons[i].id = 0; win->items[i]->type = GUI_NONE;
win->buttons[i].col = &color[COLOR_white][2];
win->buttons[i].textcol = &color[COLOR_white][3];
win->buttons[i].callback_clicked = NULL;
win->buttons[i].callback_draw = NULL;
}
for (i = 0; i < GUI_WIN_LABELS; i++) {
win->labels[i].text[0] = '\0';
win->labels[i].textcol = &color[COLOR_white][2];
win->labels[i].id = 0;
}
for (i = 0; i < GUI_WIN_LISTS; i++) {
win->lists[i].id = 0;
win->lists[i].selected = -1;
win->lists[i].callback_selectitem = NULL;
}
for (i = 0; i < GUI_WIN_ENTRYS; i++) {
win->entrys[i].text[0] = '\0';
win->entrys[i].callback_enter = NULL;
win->entrys[i].callback_changed = NULL;
win->entrys[i].id = 0;
}
for (i = 0; i < GUI_WIN_CHECKBOXES; i++) {
win->checkboxes[i].text[0] = '\0';
win->checkboxes[i].callback_changed = NULL;
win->checkboxes[i].id = 0;
win->labels[i].text[0] = '\0';
} }
win->title[0] = 0; strncpy (win->title, title, GUI_TEXTLEN);
win->screen = NULL; win->screen = NULL;
win->screen_changed = 1; win->screen_changed = 1;

Loading…
Cancel
Save