[Frosting:268] Quick fixes to LLViewerMenu

Fixes Stand Up slice not being hooked up in attachment menu
Translators, please update the pie menu accordingly. userdata="Translate,These"
Also fixes an instance where Continue Flying On Unsit would be ignored
This commit is contained in:
Lirusaito
2013-03-31 19:48:34 -04:00
parent 401ea93b57
commit d3dce27077
2 changed files with 5 additions and 7 deletions

View File

@@ -3582,7 +3582,7 @@ bool enable_standup_self()
bool enable_sitdown_self()
{
// [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT);
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() /*&& !gAgent.getFlying()*/ && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT);
// [/RLVa:KB]
// return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
@@ -3591,8 +3591,6 @@ class LLSelfEnableSitOrStand : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
// gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
std::string label;
std::string sit_text;
std::string stand_text;
@@ -3613,8 +3611,7 @@ class LLSelfEnableSitOrStand : public view_listener_t
new_value = false;
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
gMenuHolder->childSetText("Self Sit", label);
gMenuHolder->childSetText("Self Sit Attachment", label);
gMenuHolder->childSetText("Stand Up", label);
return true;
}
@@ -3974,6 +3971,7 @@ void near_sit_down_point(BOOL success, void *)
{
if (success)
{
if (!gSavedSettings.getBOOL("LiruContinueFlyingOnUnsit"))
gAgent.setFlying(FALSE);
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);

View File

@@ -12,8 +12,8 @@
<on_enable function="Object.EnableTouch" userdata="Touch" name="EnableTouch"/>
</menu_item_call>
<menu_item_call enabled="true" label="Stand Up" name="Stand Up">
<on_click function="Self.StandUp" userdata="" />
<on_enable function="Self.EnableStandUp" />
<on_click function="Self.SitOrStand"/>
<on_enable function="Self.EnableSitOrStand" userdata="Sit Down,Stand Up"/>
</menu_item_call>
<menu_item_call enabled="false" label="Detach" mouse_opaque="true" name="Detach">
<on_click function="Attachment.Detach" />