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-12 14:55:10 +0000
committerStijn Buys <ingar@osirion.org>2008-10-12 14:55:10 +0000
commitb417df720584c101f3799874a0c836a543a8d0a8 (patch)
treefb7105ed662f13753a6ab8d3efb047bad04f2316 /src/client/client.cc
parent18383a5fc596bf9546f14d7393ee66c57720b116 (diff)
user interface updates, work-in-progress
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 3f368a7..ac4c0e3 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -12,7 +12,6 @@
#include "audio/audio.h"
#include "audio/sources.h"
-#include "client/chat.h"
#include "client/client.h"
#include "client/video.h"
#include "client/console.h"
@@ -52,6 +51,13 @@ void func_r_restart(std::string const &args)
video::restart();
}
+void func_ui_chat(std::string const &args)
+{
+ if (core::application()->connected()) {
+ client()->view()->chat()->toggle();
+ }
+}
+
//--- public ------------------------------------------------------
void client_main(int count, char **arguments)
@@ -108,16 +114,13 @@ void Client::init(int count, char **arguments)
// initialize user interface
ui::init();
- new View(ui::root());
+ client_view = new View(ui::root());
// Initialize the video subsystem
if (!video::init()) {
quit(1);
}
- // initialize console
- chat::init();
-
// initialize input
input::init();
@@ -129,9 +132,12 @@ void Client::init(int count, char **arguments)
func = core::Func::add("r_restart", (core::FuncPtr) func_r_restart);
func->set_info("restart render subsystem");
+
+ func = core::Func::add("ui_chat", func_ui_chat);
+ func->set_info("toggle chat window");
- func = core::Func::add("snd_restart", (core::FuncPtr) func_snd_restart);
- func->set_info("restart audio subsystem");
+ //func = core::Func::add("snd_restart", (core::FuncPtr) func_snd_restart);
+ //func->set_info("restart audio subsystem");
}
void Client::run()
@@ -215,10 +221,8 @@ void Client::shutdown()
if (connected()) disconnect();
core::Func::remove("r_restart");
-
- core::Func::remove("snd_restart");
-
- chat::shutdown();
+ core::Func::remove("ui_chat");
+ //core::Func::remove("snd_restart");
audio::shutdown();
@@ -245,8 +249,8 @@ void Client::notify_connect()
void Client::notify_disconnect()
{
// FIXME unload sounds
- //audio::reset();
render::reset();
+ input::reset();
}
void Client::notify_zonechange()