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/view.cc')
-rw-r--r--src/client/view.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 77e0906..a2bdfe1 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -702,22 +702,26 @@ void frame(float elapsed)
render::Camera::ortho();
}
- // draw the user interface
gl::color(1.0f, 1.0f, 1.0f, 1.0f);
gl::disable(GL_TEXTURE_2D);
gl::enable(GL_BLEND);
- draw_cursor();
- ui::root()->frame();
-
- // draw the hud - TODO move as much as possible into ui::
- if (draw_ui->value() && !ui::root()->active()) {
- gl::enable(GL_TEXTURE_2D);
- gl::color(1.0f, 1.0f, 1.0f, 1.0f);
- Text::setfont("gui", 12, 18);
-
- // draw the hud
- draw_hud();
+ // draw the user interface
+ if (draw_ui->value()) {
+ draw_cursor();
+ ui::root()->frame();
+
+ // draw the hud - TODO move as much as possible into ui::
+ if (draw_ui->value() && !ui::root()->active()) {
+ gl::enable(GL_TEXTURE_2D);
+ gl::color(1.0f, 1.0f, 1.0f, 1.0f);
+ Text::setfont("gui", 12, 18);
+
+ // draw the hud
+ draw_hud();
+ }
+ } else if (ui::console()->visible()) {
+ ui::console()->event_draw();
}
gl::disable(GL_TEXTURE_2D);