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-11-08 10:17:37 +0000
committerStijn Buys <ingar@osirion.org>2008-11-08 10:17:37 +0000
commit4cad4a27677b0490d3ba0018bc3404961f925ed5 (patch)
treef9d59542f27f66a9fb4c8938f40aec66994449fc /src/client
parent27ab3566118e77754fefb32a41ee06cf24a59dfe (diff)
docking, bumps network protocol version
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cc1
-rw-r--r--src/client/notifications.cc6
-rw-r--r--src/client/notifications.h2
-rw-r--r--src/client/view.cc13
4 files changed, 19 insertions, 3 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 667a060..4f6b878 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -247,6 +247,7 @@ void Client::shutdown()
void Client::notify_connect()
{
+ view()->notify()->clear();
ui::root()->hide_menu();
}
diff --git a/src/client/notifications.cc b/src/client/notifications.cc
index b7c11fd..256f110 100644
--- a/src/client/notifications.cc
+++ b/src/client/notifications.cc
@@ -26,6 +26,12 @@ Notifications::~Notifications()
{
}
+void Notifications::clear()
+{
+ notify_log.clear();
+ notify_timestamp.clear();
+}
+
void Notifications::event_text(const std::string & text)
{
while (notify_log.size() >= NOTIFY_LOG_SIZE) {
diff --git a/src/client/notifications.h b/src/client/notifications.h
index be168fb..db3dd3e 100644
--- a/src/client/notifications.h
+++ b/src/client/notifications.h
@@ -22,6 +22,8 @@ public:
void event_text(const std::string & text);
+ void clear();
+
protected:
/// draw notifications
void draw();
diff --git a/src/client/view.cc b/src/client/view.cc
index 3ee6460..9eb9c33 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -505,7 +505,14 @@ void draw_hud()
std::stringstream status;
// draw a basic HUD
- if (core::localcontrol() && core::localcontrol()->zone()) {
+ if(core::localplayer()->view()) {
+ Text::setcolor('N'); //set normal color
+ Text::draw(render::Camera::width()-4-Text::fontwidth()*32, render::Camera::height()-Text::fontheight()*3-4, core::localcontrol()->zone()->name());
+
+ Text::setcolor('B'); //set bold color
+ Text::draw(render::Camera::width() - 4-Text::fontwidth()*32, render::Camera::height() - Text::fontheight()*2 -4, core::localplayer()->view()->name());
+
+ } else if (core::localcontrol() && core::localcontrol()->zone()) {
core::Zone *zone = core::localcontrol()->zone();
// draw targets
@@ -638,7 +645,7 @@ void draw_cursor()
if (ui::console()->visible()) {
ui::root()->set_pointer();
- } else if(ui::root()->active()) {
+ } else if(core::localplayer()->view() || ui::root()->active()) {
ui::root()->set_pointer("pointer");
@@ -693,7 +700,7 @@ void frame(float elapsed)
render::draw(elapsed); // draw the world
targets::draw(); // validate current target, render sound
- if (targets::current()) // draw target docks etc
+ if (!core::localplayer()->view() && targets::current()) // draw target docks etc
draw_entity_world_target(targets::current());
render::Camera::ortho();