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 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();
}
}
}