summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermenu.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml17
2 files changed, 25 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0eebf2051c..f7250ffb66 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3649,9 +3649,16 @@ class LLSelfSitDown : public view_listener_t
}
};
+
+
+bool show_sitdown_self()
+{
+ return isAgentAvatarValid() && !gAgentAvatarp->isSitting();
+}
+
bool enable_sitdown_self()
{
- return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying();
+ return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying();
}
class LLCheckPanelPeopleTab : public view_listener_t
@@ -9068,7 +9075,8 @@ void initialize_menus()
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.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");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d28f47c2e1..7c6b1bc357 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -92,11 +92,24 @@
shortcut="alt|shift|S"
name="Sit Down Here">
<menu_item_call.on_click
- function="Self.SitDown"
- parameter="" />
+ function="Self.SitDown"/>
+ <menu_item_call.on_visible
+ function="Self.ShowSitDown"/>
<menu_item_call.on_enable
function="Self.EnableSitDown" />
</menu_item_call>
+ <menu_item_call
+ label="Stand Up"
+ layout="topleft"
+ shortcut="alt|shift|S"
+ name="Stand up">
+ <menu_item_call.on_click
+ function="Self.StandUp"/>
+ <menu_item_call.on_visible
+ function="Self.EnableStandUp"/>
+ <menu_item_call.on_enable
+ function="Self.EnableStandUp" />
+ </menu_item_call>
<menu_item_check
label="Fly"
name="Fly"