diff options
author | Stijn Buys <ingar@osirion.org> | 2008-11-09 11:43:28 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-11-09 11:43:28 +0000 |
commit | 9d39702824e8fae5127e09fb5a05b521b48cd028 (patch) | |
tree | a56fdfc6e85a2405461be22bc80e43b33c8b8b48 /src/client/client.cc | |
parent | 6cd1a38f1d3a0a45846d63a75475400372af1277 (diff) |
docking menus
Diffstat (limited to 'src/client/client.cc')
-rw-r--r-- | src/client/client.cc | 10 |
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(); } } } |