Disable "Show HUD Attachments" menu option if user is prevented to hide HUDs because of RLVa
parent
3f2278ff71
commit
2b97d11f28
|
|
@ -10402,6 +10402,13 @@ class LLViewCheckHUDAttachments : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
// <FS:Ansariel> Disable Show HUD attachments if prevented by RLVa
|
||||
bool enable_show_HUD_attachments()
|
||||
{
|
||||
return (!rlv_handler_t::isEnabled() || !gRlvAttachmentLocks.hasLockedHUD());
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
|
||||
class LLEditEnableTakeOff : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
|
|
@ -11105,6 +11112,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLViewStatusAway(), "View.Status.CheckAway");
|
||||
view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb");
|
||||
view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
|
||||
enable.add("View.EnableHUDAttachments", boost::bind(&enable_show_HUD_attachments)); // <FS:Ansariel> Disable Show HUD attachments if prevented by RLVa
|
||||
// <FS:Zi> Add reset camera angles menu
|
||||
view_listener_t::addMenu(new LLViewResetCameraAngles(), "View.ResetCameraAngles");
|
||||
// </FS:Zi>
|
||||
|
|
|
|||
|
|
@ -347,6 +347,8 @@
|
|||
function="View.CheckHUDAttachments" />
|
||||
<menu_item_check.on_click
|
||||
function="View.ShowHUDAttachments" />
|
||||
<menu_item_check.on_enable
|
||||
function="View.EnableHUDAttachments" />
|
||||
</menu_item_check>
|
||||
|
||||
<menu_item_separator/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue