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>2009-01-25 14:27:02 +0000
committerStijn Buys <ingar@osirion.org>2009-01-25 14:27:02 +0000
commitde3b64a4f0f14f197f74e56cecdd11a9fbd0cc42 (patch)
tree76bfd7531969be8b288e34b7f471017e3d420f85 /src/client
parent1111b6fb9d7db3d1434e03c859270e734219a528 (diff)
enhanced loader screen
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cc4
-rw-r--r--src/client/video.cc5
-rw-r--r--src/client/view.cc6
3 files changed, 10 insertions, 5 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 66feecf..8aba931 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -254,7 +254,7 @@ void Client::shutdown()
void Client::notify_connect()
{
- video::set_loader_message("Loading...");
+ video::set_loader_message();
video::frame_loader();
view()->notify()->clear();
@@ -278,7 +278,7 @@ void Client::notify_disconnect()
void Client::notify_zonechange()
{
- video::set_loader_message("Loading...");
+ video::set_loader_message();
video::frame_loader();
// unload entity sounds
diff --git a/src/client/video.cc b/src/client/video.cc
index b4ee70e..c861282 100644
--- a/src/client/video.cc
+++ b/src/client/video.cc
@@ -304,7 +304,7 @@ void draw_loader()
gl::color(1.0f, 1.0f, 1.0f, 1.0f);
math::Vector2f pos;
math::Vector2f size(render::State::width(), render::State::height());
- ui::paint::bitmap(pos, size, "banner");
+ ui::paint::bitmap(pos, size, "loader");
if (loader_message.size()) {
using render::Text;
@@ -357,12 +357,15 @@ void frame(float elapsed)
render::draw_target(targets::current());
render::Camera::ortho();
+ client()->view()->show();
} else {
draw_loader();
+ client()->view()->hide();
}
} else {
+ client()->view()->hide();
render::Camera::ortho();
}
diff --git a/src/client/view.cc b/src/client/view.cc
index 6631f95..68df0e3 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -231,8 +231,10 @@ void View::resize()
void View::draw()
{
+ // view is only drawn when the application is connected
+
// draw hud only when connected and controlling a spacecraft
- if (core::application()->connected() && core::localcontrol() && !ui::root()->active()) {
+ if (core::localcontrol() && !ui::root()->active()) {
view_hud->set_visible(true);
} else {
view_hud->set_visible(false);
@@ -252,7 +254,7 @@ void View::draw()
view_stats->set_visible(draw_stats->value() ? true : false);
view_keypress->set_visible(draw_keypress->value() ? true : false);
- if (core::application()->connected() && core::game()->interactive()) {
+ if (core::game()->interactive()) {
if (ui::console()->visible()) {
view_notify->set_visible(false);
} else if (view_chat->visible() && !view_chat->small_view()) {