From 9d39702824e8fae5127e09fb5a05b521b48cd028 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 9 Nov 2008 11:43:28 +0000 Subject: docking menus --- src/client/client.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client/client.cc') 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(); } } } -- cgit v1.2.3