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-21 19:00:39 +0000
committerStijn Buys <ingar@osirion.org>2008-10-21 19:00:39 +0000
commitd79c0223315beaf55fcd10d6891675c4d57b5e2b (patch)
tree3ea902634192dfcffa21a4e7a8cd28da714f0daa /src/client/client.cc
parent9f2e49593639a9f1f3e5f4f7b690ff364afefd56 (diff)
moved client console into libui
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 076e72a..2400089 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -14,7 +14,6 @@
#include "audio/sources.h"
#include "client/client.h"
#include "client/video.h"
-#include "client/console.h"
#include "client/input.h"
#include "client/view.h"
#include "core/core.h"
@@ -65,11 +64,6 @@ void func_ui_chatsmall(std::string const &args)
}
}
-void func_ui_console(std::string const &args)
-{
- client()->console()->toggle();
-}
-
//--- public ------------------------------------------------------
void client_main(int count, char **arguments)
@@ -100,11 +94,9 @@ void Client::quit(int status)
void Client::init(int count, char **arguments)
{
+ client_view = 0;
con_print << "^BInitializing client..." << std::endl;
- client_console = 0;
- client_view = 0;
-
// initialize core
core::Cvar::sv_private = core::Cvar::set("sv_private", "0");
core::Application::init(count, arguments);
@@ -128,9 +120,7 @@ void Client::init(int count, char **arguments)
// initialize user interface
ui::init();
-
client_view = new View(ui::root());
- client_console = new Console(ui::root());
// Initialize the video subsystem
if (!video::init()) {
@@ -155,9 +145,6 @@ void Client::init(int count, char **arguments)
func = core::Func::add("ui_chatsmall", func_ui_chatsmall);
func->set_info("toggle small chat window");
- func = core::Func::add("ui_console", func_ui_console);
- func->set_info("toggle console on or off");
-
func = core::Func::add("snd_restart", (core::FuncPtr) func_snd_restart);
func->set_info("restart audio subsystem");
@@ -174,8 +161,6 @@ void Client::run()
Uint32 client_current_timestamp = 0;
Uint32 client_previous_timestamp = 0;
- //console()->clear_notify();
-
while (true) {
// current time in microseconds
client_current_timestamp = SDL_GetTicks();
@@ -219,8 +204,8 @@ void Client::frame(unsigned long timestamp)
core::application()->connect("");
}
// show the console if everything fails
- if (!core::application()->connected() && !console()->visible()) {
- console()->toggle();
+ if (!core::application()->connected() && !ui::console()->visible()) {
+ ui::console()->toggle();
}
} else {
// show the main menu on non-interactive modules
@@ -243,7 +228,6 @@ void Client::shutdown()
core::Func::remove("r_restart");
core::Func::remove("ui_chat");
core::Func::remove("ui_chatsmall");
- core::Func::remove("ui_console");
core::Func::remove("snd_restart");
audio::shutdown();
@@ -271,6 +255,8 @@ void Client::notify_disconnect()
audio::reset();
render::reset();
input::reset();
+
+ // TODO clear chat and notifications
}
void Client::notify_zonechange()