Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-07 17:14:27 +0000
committerStijn Buys <ingar@osirion.org>2008-10-07 17:14:27 +0000
commitf54bd48a884e4e3c95818f042a4b2418a6e070a4 (patch)
tree73e82729a2f97b58e94ffd6944ac1ad47bf8314e /src/client/view.cc
parentf8d1ee921c83b7b148883b3ee16e4ec9c776d6db (diff)
working button click
Diffstat (limited to 'src/client/view.cc')
-rw-r--r--src/client/view.cc41
1 files changed, 6 insertions, 35 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 7f9efa1..50b5b61 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -57,6 +57,7 @@ void init()
draw_devinfo = core::Cvar::get("draw_devinfo", "0", core::Cvar::Archive);
draw_devinfo->set_info("[bool] draw developer information");
+ // FIXME integrate with libui
draw_ui = core::Cvar::get("draw_ui", "1", core::Cvar::Archive);
draw_ui->set_info("[bool] draw the user interface");
@@ -107,7 +108,7 @@ void clear_zone(core::Zone *zone)
zone->set_sky_texture(0);
}
}
-
+/*
void draw_loader()
{
using namespace render;
@@ -153,7 +154,7 @@ void draw_banner()
gl::end();
}
-
+*/
/*
FIXME should be merged with the render passes
and in the bbox pass
@@ -777,20 +778,6 @@ void frame(float seconds)
render::Stats::clear();
- // load the intro
- if (!core::application()->connected()) {
- if (core::application()->load("intro")) {
- current_zone = 0;
- core::application()->connect("");
- }
- } else {
- /*
- if (!core::game()->interactive() && !ui::root()->active()) {
- ui::root()->show_window("main");
- }
- */
- }
-
if (core::application()->connected() && core::game()->serverframetime()) {
if (core::localplayer()->zone() != current_zone) {
if (current_zone)
@@ -803,10 +790,6 @@ void frame(float seconds)
if (targets::current()) // draw target docks etc
draw_entity_world_target(targets::current());
- } else {
- // FIXME this should be handle through a module_disconnect signal
- // this should to the same as calling clear_zone(0)
- current_zone = 0;
}
// switch to orthographic projection to draw the GUI
@@ -820,27 +803,15 @@ void frame(float seconds)
// draw the user interface
gl::color(1.0f, 1.0f, 1.0f, 1.0f);
gl::disable(GL_TEXTURE_2D);
+ gl::enable(GL_BLEND);
- ui::frame();
+ ui::root()->frame();
// draw the hud - TODO move as much as possible into ui::
- gl::enable(GL_BLEND);
+
gl::enable(GL_TEXTURE_2D);
gl::color(1.0f, 1.0f, 1.0f, 1.0f);
- if (!core::application()->connected()) {
- // draw the loader bitmap
- draw_loader();
-
- // force console on if not connected
- if (!console()->visible())
- console()->toggle();
-
- } /*else if (!core::game()->interactive()) {
- // draw the banner bitmap
- draw_banner();
- }*/
-
// draw text elements
if (draw_ui->value()) {
Text::setfont("gui", 12, 18);