summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-08-30 06:38:44 -0400
committerOz Linden <oz@lindenlab.com>2010-08-30 06:38:44 -0400
commitd84c6625c707b5d61b71749b74f3cc4fb8f02048 (patch)
tree7a31d44dfbd4e8244a9ee4f9504fe45ac3280482 /indra/newview/llviewermenu.cpp
parentc4acbaf7c4120d4dc6154420c992e3942fd25df3 (diff)
parentb0bf8b9619ec89a37bfc7d8d9e7f7d49904dfb02 (diff)
Automated merge with http://bitbucket.org/aleric/viewer-development-aleric-export
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c275068028..daeace0ec5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3383,8 +3383,21 @@ class LLSelfStandUp : public view_listener_t
bool enable_standup_self()
{
- bool new_value = isAgentAvatarValid() && gAgentAvatarp->isSitting();
- return new_value;
+ return isAgentAvatarValid() && gAgentAvatarp->isSitting();
+}
+
+class LLSelfSitDown : public view_listener_t
+ {
+ bool handleEvent(const LLSD& userdata)
+ {
+ gAgent.sitDown();
+ return true;
+ }
+ };
+
+bool enable_sitdown_self()
+{
+ return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
// Used from the login screen to aid in UI work on side tray
@@ -8100,11 +8113,13 @@ void initialize_menus()
// Admin top level
view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
- // Self pie menu
+ // Self context menu
view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp");
+ enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
+ view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown");
+ enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self));
view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
- enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
// we don't use boost::bind directly to delay side tray construction