Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 5bf783a..a40023b 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("ui_chatbar", Client::func_ui_chatbar);
func->set_info("toggle chat bar");
+
+ func = core::Func::add("ui_inventory", Client::func_ui_inventory);
+ func->set_info("toggle inventory");
func = core::Func::add("ui_map", Client::func_ui_map);
func->set_info("toggle map");
@@ -488,6 +491,13 @@ void Client::func_ui_chatbar(std::string const &args)
}
}
+void Client::func_ui_inventory(std::string const &args)
+{
+ if (client()->connected() && client()->worldview()->playerview()->visible()) {
+ client()->worldview()->playerview()->toggle_inventory();
+ }
+}
+
void Client::func_ui_map(std::string const &args)
{
if (client()->connected() && client()->worldview()->playerview()->visible()) {