diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1ceec00c8f..fbbe6ce4f2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -676,6 +676,19 @@ class LLAdvancedCheckHUDInfo : public view_listener_t }; +////////////// +// FLYING // +////////////// + +class LLAdvancedAgentFlyingInfo : public view_listener_t +{ + bool handleEvent(const LLSD&) + { + return gAgent.getFlying(); + } +}; + + /////////////////////// // CLEAR GROUP CACHE // /////////////////////// @@ -3729,35 +3742,6 @@ bool enable_sitdown_self() return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying(); } -class LLSelfToggleSitStand : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - if (isAgentAvatarValid()) - { - if (gAgentAvatarp->isSitting()) - { - gAgent.standUp(); - } - else - { - gAgent.sitDown(); - } - } - return true; - } -}; - -bool enable_sit_stand() -{ - return enable_sitdown_self() || enable_standup_self(); -} - -bool enable_fly_land() -{ - return gAgent.getFlying() || LLAgent::enableFlying(); -} - class LLCheckPanelPeopleTab : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8944,7 +8928,7 @@ void initialize_menus() // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); - enable.add("Agent.enableFlyLand", boost::bind(&enable_fly_land)); + enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying)); commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2)); @@ -8992,6 +8976,9 @@ void initialize_menus() view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb"); view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); + // Me > Movement + view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); + //Communicate Nearby chat view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat"); @@ -9255,8 +9242,11 @@ void initialize_menus() view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState"); // Self context menu - view_listener_t::addMenu(new LLSelfToggleSitStand(), "Self.ToggleSitStand"); - enable.add("Self.EnableSitStand", boost::bind(&enable_sit_stand)); + 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)); + enable.add("Self.ShowSitDown", boost::bind(&show_sitdown_self)); view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); |