From 00464c237fbd3a01137099dedf23dc44569472fd Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 24 May 2008 15:38:07 +0000 Subject: surface flags: light --- src/client/view.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/view.cc b/src/client/view.cc index e7cb5cc..174e1ed 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -28,6 +28,7 @@ namespace client { +core::Cvar *draw_ui = 0; core::Cvar *draw_stats = 0; core::Cvar *cl_crosshaircolor = 0; @@ -43,6 +44,9 @@ void init() draw_stats = core::Cvar::get("draw_stats", "0", core::Cvar::Archive); draw_stats->set_info("[bool] draw network and render statistics"); + draw_ui = core::Cvar::get("draw_ui", "1", core::Cvar::Archive); + draw_ui->set_info("[bool] draw the user interface"); + cl_crosshaircolor = core::Cvar::get("cl_crosshaircolor", "1 1 1", core::Cvar::Archive); cl_crosshaircolor->set_info("[r g b] crosshairs color"); } @@ -272,12 +276,14 @@ void frame(float seconds) Text::setfont("bitmaps/fonts/console", 12, 18); console()->draw(); chat::draw(); + + if (draw_ui->value()) { + Text::setfont("bitmaps/fonts/gui", 16, 24); + draw_status(); - Text::setfont("bitmaps/fonts/gui", 16, 24); - draw_status(); - - // draw the mouse cursor - draw_cursor(); + // draw the mouse cursor + draw_cursor(); + } gl::disable(GL_TEXTURE_2D); } -- cgit v1.2.3