diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-08-31 19:55:19 -0400 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-08-31 19:55:19 -0400 |
| commit | 704405903f8d1606ef98df76d37c83931e5368ab (patch) | |
| tree | 7a970bcfad80962c4d0e96e9351ed718da687dff /indra/newview/llviewermenu.cpp | |
| parent | 85d659f44d2badfd42ee9b1ae7cd0971806672d4 (diff) | |
| parent | 3cabca8df62ae8ee815dd7d885f14f5a7d0ea98d (diff) | |
pull from viewer-development
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 23 |
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 |
