diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/client.cc | 4 | ||||
-rw-r--r-- | src/client/video.cc | 5 | ||||
-rw-r--r-- | src/client/view.cc | 6 |
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()) { |