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-26 20:19:10 +0000
committerStijn Buys <ingar@osirion.org>2009-01-26 20:19:10 +0000
commitc99a440e6fb1edf35e280f4df8ba22600e490535 (patch)
tree9c39358c234e1629bc0cb2e4b5a2685f562663c9 /src/client/client.cc
parent597b3e0921dd24fa5e224377da4754da93a782c1 (diff)
removed View class
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 8aba931..4533f84 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -15,7 +15,6 @@
#include "client/client.h"
#include "client/video.h"
#include "client/input.h"
-#include "client/view.h"
#include "core/core.h"
#include "core/loader.h"
#include "core/zone.h"
@@ -61,7 +60,7 @@ void Client::quit(int status)
void Client::init(int count, char **arguments)
{
- client_view = 0;
+ client_worldview = 0;
con_print << "^BInitializing client..." << std::endl;
// initialize core
@@ -92,7 +91,7 @@ void Client::init(int count, char **arguments)
// initialize user interface
ui::init();
- client_view = new View(ui::root());
+ client_worldview = new WorldView(ui::root());
// Initialize the video subsystem
if (!video::init()) {
@@ -257,8 +256,7 @@ void Client::notify_connect()
video::set_loader_message();
video::frame_loader();
- view()->notify()->clear();
- view()->chat()->clear();
+ worldview()->clear();
ui::root()->hide_menu();
video::set_caption();
@@ -270,8 +268,7 @@ void Client::notify_disconnect()
render::reset();
input::reset();
- view()->notify()->clear();
- view()->chat()->clear();
+ worldview()->clear();
video::set_caption();
}
@@ -334,9 +331,8 @@ void Client::notify_message(const core::Message::Channel channel, const std::str
break;
}
- if (view()) {
- view()->chat()->event_text(message);
- view()->notify()->event_text(message);
+ if (worldview()) {
+ worldview()->event_text(message);
}
con_print << message << std::endl;
@@ -368,24 +364,24 @@ void Client::func_r_restart(std::string const &args)
void Client::func_ui_chat(std::string const &args)
{
- if (core::application()->connected()) {
- client()->view()->chat()->set_small_view(false);
- client()->view()->chat()->toggle();
+ if (client()->connected() && client()->worldview()->playerview()->visible()) {
+ client()->worldview()->playerview()->chat()->set_small_view(false);
+ client()->worldview()->playerview()->chat()->toggle();
}
}
void Client::func_ui_chatsmall(std::string const &args)
{
- if (core::application()->connected()) {
- client()->view()->chat()->set_small_view(true);
- client()->view()->chat()->toggle();
+ if (client()->connected() && client()->worldview()->playerview()->visible()) {
+ client()->worldview()->playerview()->chat()->set_small_view(true);
+ client()->worldview()->playerview()->chat()->toggle();
}
}
void Client::func_ui_map(std::string const &args)
{
- if (core::application()->connected()) {
- client()->view()->map()->toggle();
+ if (client()->connected() && client()->worldview()->playerview()->visible()) {
+ client()->worldview()->playerview()->map()->toggle();
}
}