Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view.cc16
1 files changed, 11 insertions, 5 deletions
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);
}