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-04-15 17:08:51 +0000
committerStijn Buys <ingar@osirion.org>2009-04-15 17:08:51 +0000
commita95028547981614e06ea7a6d22b853b85418cea3 (patch)
treed4d6998a4118a4d8690ce138d586abfba4893179 /src/client/client.cc
parent4f33f59571f10019c1e7a0e3640b2f69c159a8cf (diff)
added info registry, list_info
added network info transfer added info based buy menu and related game changes
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index dffa1ca..47af682 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -144,6 +144,9 @@ void Client::init(int count, char **arguments)
func = core::Func::add("menu", func_menu);
func->set_info("[command] menu functions");
+ func = core::Func::add("view", func_view);
+ func->set_info("[command] view menu functions");
+
previous_timestamp = 0;
}
@@ -256,6 +259,7 @@ void Client::shutdown()
core::Func::remove("ui_map");
core::Func::remove("ui_menu");
core::Func::remove("menu");
+ core::Func::remove("view");
audio::shutdown();
@@ -495,6 +499,15 @@ void Client::func_ui_menu(std::string const &args)
}
}
+// entity menus
+void Client::func_view(std::string const &args)
+{
+ if (client()->worldview()) {
+ client()->worldview()->playerview()->show_menu(args);
+ }
+}
+
+// global menus
void Client::func_menu(std::string const &args)
{
if (!ui::root()) {
@@ -535,14 +548,6 @@ void Client::func_menu(std::string const &args)
} else if (command.compare("list") == 0) {
ui::root()->list_menus();
- } else if (command.compare("view") == 0) {
- if (client()->worldview()) {
- std::string label;
- if (!(argstr >> label)) {
- label.assign("main");
- }
- client()->worldview()->playerview()->show_menu(label);
- }
} else {
ui::root()->show_menu(command.c_str());
}