mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
fix the input line location bug and change enabled to visible due to
enabled meaning something else in UIs
This commit is contained in:
parent
508fb4fb5c
commit
56bfc6dc45
3 changed files with 9 additions and 9 deletions
|
@ -56,7 +56,7 @@ struct view_s {
|
|||
int num_children;
|
||||
int max_children;
|
||||
void (*draw)(view_t *view);
|
||||
unsigned enabled:1;
|
||||
unsigned visible:1;
|
||||
unsigned resize_x:1;
|
||||
unsigned resize_y:1;
|
||||
};
|
||||
|
|
|
@ -567,7 +567,7 @@ void
|
|||
C_DrawInputLine (inputline_t *il)
|
||||
{
|
||||
il_data_t *data = il->user_data;
|
||||
DrawInputLine (data->xbase + data->x, data->xbase + data->y, data->cursor,
|
||||
DrawInputLine (data->xbase + data->x, data->ybase + data->y, data->cursor,
|
||||
il);
|
||||
}
|
||||
|
||||
|
@ -719,8 +719,8 @@ C_DrawConsole (int lines)
|
|||
{
|
||||
if (console_view->ylen != lines)
|
||||
view_resize (console_view, console_view->xlen, lines);
|
||||
console_view->enabled = lines != 0;
|
||||
menu_view->enabled = key_dest == key_menu;
|
||||
console_view->visible = lines != 0;
|
||||
menu_view->visible = key_dest == key_menu;
|
||||
|
||||
view_draw (con_data.view);
|
||||
}
|
||||
|
@ -773,18 +773,18 @@ C_Init (void)
|
|||
view_add (con_data.view, menu_view);
|
||||
|
||||
console_view->draw = draw_console;
|
||||
console_view->enabled = 0;
|
||||
console_view->visible = 0;
|
||||
console_view->resize_x = console_view->resize_y = 1;
|
||||
|
||||
say_view->draw = draw_say;
|
||||
say_view->enabled = 0;
|
||||
say_view->visible = 0;
|
||||
say_view->resize_x = 1;
|
||||
|
||||
notify_view->draw = draw_notify;
|
||||
notify_view->resize_x = 1;
|
||||
|
||||
menu_view->draw = Menu_Draw;
|
||||
menu_view->enabled = 0;
|
||||
menu_view->visible = 0;
|
||||
|
||||
view = view_new (0, 0, 320, 170, grav_northwest);
|
||||
view->draw = draw_console_text;
|
||||
|
|
|
@ -53,7 +53,7 @@ view_new (int xp, int yp, int xl, int yl, grav_t grav)
|
|||
view->xlen = xl;
|
||||
view->ylen = yl;
|
||||
view->gravity = grav;
|
||||
view->enabled = 1;
|
||||
view->visible = 1;
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ view_draw (view_t *view)
|
|||
|
||||
for (i = 0; i < view->num_children; i++) {
|
||||
view_t *v = view->children[i];
|
||||
if (v->enabled && v->draw)
|
||||
if (v->visible && v->draw)
|
||||
v->draw (v);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue