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.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index a5da7d4..771f63a 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -197,7 +197,7 @@ View::View(ui::Widget *parent) : ui::Widget(parent)
view_devinfo = new DevInfo(this);
view_stats = new Stats(this);
view_keypress = new KeyPress(this);
-
+ view_notify = new Notifications(this);
view_chat = new Chat(this);
// make sure the view is at the bottom of the draw stack
@@ -216,6 +216,10 @@ void View::resize()
view_devinfo->set_size(font()->width()*32, font()->height()*5);
view_devinfo->set_location(font()->width() * 0.5f, font()->height() * 0.5f);
+ // reposition notifications widget
+ view_notify->set_location(font()->width(), view_devinfo->top() + view_devinfo->height() + font()->width());
+ view_notify->set_size(width() - font()->width() * 2, height() * 0.5f - view_notify->top());
+
// reposition stats widget
view_stats->set_size(font()->width()*12, font()->height()*5);
view_stats->set_location(width() - view_stats->width() - font()->width() * 0.5, font()->height() * 0.5f);
@@ -237,6 +241,16 @@ 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 (client()->console()->visible() || chat()->visible()) {
+ view_notify->set_visible(false);
+ } else {
+ view_notify->set_visible(true);
+ }
+ } else {
+ view_notify->set_visible(false);
+ }
+
if (core::localcontrol() && (input::mouse_control || input::joystick_control) &&
(render::Camera::mode() == render::Camera::Cockpit || render::Camera::mode() == render::Camera::Track)) {
view_center->set_visible(true);