diff --git a/include/QF/view.h b/include/QF/view.h index bd899995a..64863bc10 100644 --- a/include/QF/view.h +++ b/include/QF/view.h @@ -183,6 +183,10 @@ void view_delete (view_t *view); /** Draw the child views of a view. If a child view is not visible (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. */ void view_draw (view_t *view); diff --git a/libs/console/client.c b/libs/console/client.c index 06c80acc5..1d55fcf48 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -763,7 +763,7 @@ C_DrawConsole (void) console_view->visible = con_data.lines != 0; menu_view->visible = key_dest == key_menu; - view_draw (con_data.view); + con_data.view->draw (con_data.view); } static void diff --git a/libs/console/server.c b/libs/console/server.c index e924a3319..9daaa9fab 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -346,7 +346,7 @@ process_input (void) getmaxyx (stdscr, screen_y, screen_x); con_linewidth = screen_x; 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; - view_draw (sv_con_data.view); + sv_con_data.view->draw (sv_con_data.view); doupdate (); } #endif diff --git a/qw/source/sbar.c b/qw/source/sbar.c index 94bb385a2..07c27072f 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -767,7 +767,7 @@ draw_inventory_sbar (view_t *view) { if (cl.spectator && autocam == CAM_TRACK) { if (sbar_frags_view) - view_draw (sbar_frags_view); + sbar_frags_view->draw (sbar_frags_view); return; } draw_pic (view, 0, 0, sb_ibar);