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-19 16:03:56 +0000
committerStijn Buys <ingar@osirion.org>2008-10-19 16:03:56 +0000
commit1d580ed36893b24b618ff1e6f9023e497c62498c (patch)
treeac942e5fd15811c6ea2fa449f88f5c4cc4187d30 /src/client/client.cc
parent56cdfd3822d2800abdd2f912ab7f76a5764793a7 (diff)
on-screen notifications
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 45cc47a..c1fab8a 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -92,6 +92,9 @@ void Client::quit(int status)
void Client::init(int count, char **arguments)
{
con_print << "^BInitializing client..." << std::endl;
+
+ client_console = 0;
+ client_view = 0;
// initialize core
core::Cvar::sv_private = core::Cvar::set("sv_private", "0");
@@ -262,12 +265,23 @@ void Client::notify_zonechange()
render::unload();
}
-void Client::notify_sound(const char * name)
+void Client::notify_sound(const char *name)
{
audio::play(name);
}
-void Client::notify_message(core::Message::Channel const channel, std::string const message)
+void Client::notify_message(const char *message)
+{
+ std::string text(message);
+ notify_message(core::Message::Info, text);
+}
+
+void Client::notify_message(const std::string &message)
+{
+ notify_message(core::Message::Info, message);
+}
+
+void Client::notify_message(const core::Message::Channel channel, const std::string &message)
{
switch(channel) {
@@ -293,9 +307,12 @@ void Client::notify_message(core::Message::Channel const channel, std::string co
break;
}
+ if (view()) {
+ view()->chat()->event_text(message);
+ view()->notify()->event_text(message);
+ }
+
con_print << message << std::endl;
- view()->chat()->event_text(message);
- //console()->notify(message);
}
/* FIXME