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-11-09 11:43:28 +0000
committerStijn Buys <ingar@osirion.org>2008-11-09 11:43:28 +0000
commit9d39702824e8fae5127e09fb5a05b521b48cd028 (patch)
treea56fdfc6e85a2405461be22bc80e43b33c8b8b48 /src/client/client.cc
parent6cd1a38f1d3a0a45846d63a75475400372af1277 (diff)
docking menus
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 a83beb7..617b569 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -187,11 +187,21 @@ void Client::frame(unsigned long timestamp)
// show the join menu when player does not control an entity
} else if (core::game()->time() && !core::localcontrol()) {
ui::root()->show_menu("join");
+
+ // show the view menu when docked
+ } else if (core::localcontrol() && core::localplayer()->view()) {
+ ui::root()->show_menuview("main");
}
+
} else {
if (core::localcontrol()) {
+ // hide join menu
if (ui::root()->active()->label().compare("join") == 0) {
ui::root()->hide_menu();
+
+ // hide view menu
+ } else if (!core::localplayer()->view() && (ui::root()->active()->label().compare("view") == 0)) {
+ ui::root()->hide_menu();
}
}
}