mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
audit the usage of view_draw. It is really meant for draw callbacks, not direct usage by the application.
This commit is contained in:
parent
2894182ec5
commit
7925e16d73
4 changed files with 8 additions and 4 deletions
|
@ -183,6 +183,10 @@ void view_delete (view_t *view);
|
||||||
/** Draw the child views of a view. If a child view is not visible
|
/** Draw the child views of a view. If a child view is not visible
|
||||||
(view_t::visible is 0), the child will be skipped.
|
(view_t::visible is 0), the child will be skipped.
|
||||||
|
|
||||||
|
\note It is best to always use view_t::draw() to draw a view rather than
|
||||||
|
calling this directly. This function is really for the view's draw
|
||||||
|
callback to call to draw its sub-views.
|
||||||
|
|
||||||
\param view The view of which to draw the children.
|
\param view The view of which to draw the children.
|
||||||
*/
|
*/
|
||||||
void view_draw (view_t *view);
|
void view_draw (view_t *view);
|
||||||
|
|
|
@ -763,7 +763,7 @@ C_DrawConsole (void)
|
||||||
console_view->visible = con_data.lines != 0;
|
console_view->visible = con_data.lines != 0;
|
||||||
menu_view->visible = key_dest == key_menu;
|
menu_view->visible = key_dest == key_menu;
|
||||||
|
|
||||||
view_draw (con_data.view);
|
con_data.view->draw (con_data.view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -346,7 +346,7 @@ process_input (void)
|
||||||
getmaxyx (stdscr, screen_y, screen_x);
|
getmaxyx (stdscr, screen_y, screen_x);
|
||||||
con_linewidth = screen_x;
|
con_linewidth = screen_x;
|
||||||
view_resize (sv_con_data.view, screen_x, screen_y);
|
view_resize (sv_con_data.view, screen_x, screen_y);
|
||||||
view_draw (sv_con_data.view);
|
sv_con_data.view->draw (sv_con_data.view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ init (void)
|
||||||
|
|
||||||
con_linewidth = screen_x;
|
con_linewidth = screen_x;
|
||||||
|
|
||||||
view_draw (sv_con_data.view);
|
sv_con_data.view->draw (sv_con_data.view);
|
||||||
doupdate ();
|
doupdate ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -767,7 +767,7 @@ draw_inventory_sbar (view_t *view)
|
||||||
{
|
{
|
||||||
if (cl.spectator && autocam == CAM_TRACK) {
|
if (cl.spectator && autocam == CAM_TRACK) {
|
||||||
if (sbar_frags_view)
|
if (sbar_frags_view)
|
||||||
view_draw (sbar_frags_view);
|
sbar_frags_view->draw (sbar_frags_view);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
draw_pic (view, 0, 0, sb_ibar);
|
draw_pic (view, 0, 0, sb_ibar);
|
||||||
|
|
Loading…
Reference in a new issue