audit the usage of view_draw. It is really meant for draw callbacks, not direct usage by the application.

This commit is contained in:
Bill Currie 2007-04-09 00:22:17 +00:00 committed by Jeff Teunissen
parent 2894182ec5
commit 7925e16d73
4 changed files with 8 additions and 4 deletions

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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);