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-15 20:33:15 +0000
committerStijn Buys <ingar@osirion.org>2008-10-15 20:33:15 +0000
commit1e0df536c2fae85c317ce9c3cc17603d5f98c911 (patch)
tree3ab262d51451cda3e926e9581b294f08d39031d9 /src/client/client.cc
parent97fca172fd51270cebd5b722f861a6c753bd4d2a (diff)
moved client console into a Widget
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index ae4f232..200becd 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -58,6 +58,11 @@ void func_ui_chat(std::string const &args)
}
}
+void func_ui_console(std::string const &args)
+{
+ client()->console()->toggle();
+}
+
//--- public ------------------------------------------------------
void client_main(int count, char **arguments)
@@ -93,7 +98,6 @@ void Client::init(int count, char **arguments)
// initialize core
core::Cvar::sv_dedicated = core::Cvar::set("sv_private", "0");
core::Application::init(count, arguments);
- Console::init();
// client variables
core::Cvar *cvar = 0;
@@ -114,7 +118,9 @@ 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()) {
@@ -136,6 +142,9 @@ void Client::init(int count, char **arguments)
func = core::Func::add("ui_chat", func_ui_chat);
func->set_info("toggle 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");
}
@@ -149,10 +158,8 @@ void Client::run()
Uint32 client_current_timestamp = 0;
Uint32 client_previous_timestamp = 0;
-
-
- console()->flush();
- console()->clear_notify();
+
+ //console()->clear_notify();
while (true) {
// current time in microseconds
@@ -222,12 +229,11 @@ void Client::shutdown()
core::Func::remove("r_restart");
core::Func::remove("ui_chat");
+ core::Func::remove("ui_console");
//core::Func::remove("snd_restart");
audio::shutdown();
- Console::shutdown();
-
input::shutdown();
video::shutdown();
@@ -290,7 +296,7 @@ void Client::notify_message(core::Message::Channel const channel, std::string co
}
con_print << message << std::endl;
- console()->notify(message);
+ //console()->notify(message);
}
/* FIXME