FIRE-7893: Detach function on inspect self toast without function
parent
16f22beddd
commit
71ab720c9f
|
|
@ -317,10 +317,16 @@ void LLInspectAvatar::onOpen(const LLSD& data)
|
|||
mAvatarID = data["avatar_id"];
|
||||
|
||||
// <FS:Ansariel> Undo CHUI-90 and make avatar inspector useful again
|
||||
BOOL self = mAvatarID == gAgent.getID();
|
||||
BOOL self = mAvatarID == gAgentID;
|
||||
|
||||
getChild<LLUICtrl>("gear_self_btn")->setVisible(self);
|
||||
getChild<LLUICtrl>("gear_btn")->setVisible(!self);
|
||||
LLMenuButton* gear_self_btn = getChild<LLMenuButton>("gear_self_btn");
|
||||
gear_self_btn->setVisible(self);
|
||||
|
||||
if (self)
|
||||
{
|
||||
gear_self_btn->setMenu(gMenuInspectSelf);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
|
|
@ -356,6 +362,7 @@ void LLInspectAvatar::onOpen(const LLSD& data)
|
|||
void LLInspectAvatar::onClose(bool app_quitting)
|
||||
{
|
||||
getChild<LLMenuButton>("gear_btn")->hideMenu();
|
||||
getChild<LLMenuButton>("gear_self_btn")->hideMenu();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
|
|||
|
|
@ -222,6 +222,12 @@ PieMenu *gPieMenuLand = NULL;
|
|||
PieMenu *gPieMenuMuteParticle = NULL;
|
||||
// <FS:Zi> Pie menu
|
||||
|
||||
// <FS:Ansariel> FIRE-7893: Detach function on inspect self toast without function
|
||||
LLToggleableMenu *gMenuInspectSelf = NULL;
|
||||
LLContextMenu *gInspectSelfDetachScreenMenu = NULL;
|
||||
LLContextMenu *gInspectSelfDetachMenu = NULL;
|
||||
// </FS:Ansariel>
|
||||
|
||||
const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents");
|
||||
|
||||
LLMenuGL* gAttachSubMenu = NULL;
|
||||
|
|
@ -573,6 +579,14 @@ void init_menus()
|
|||
"menu_pie_mute_particle.xml", gMenuHolder, registry);
|
||||
// </FS:Zi> Pie menu
|
||||
|
||||
// <FS:Ansariel> FIRE-7893: Detach function on inspect self toast without function
|
||||
gMenuInspectSelf = LLUICtrlFactory::createFromFile<LLToggleableMenu>(
|
||||
"menu_inspect_self_gear.xml", gMenuHolder, registry);
|
||||
|
||||
gInspectSelfDetachScreenMenu = gMenuHolder->getChild<LLContextMenu>("Inspect Self Detach HUD", true);
|
||||
gInspectSelfDetachMenu = gMenuHolder->getChild<LLContextMenu>("Inspect Self Detach", true);
|
||||
// </FS:Ansariel>
|
||||
|
||||
///
|
||||
/// set up the colors
|
||||
///
|
||||
|
|
@ -2893,6 +2907,11 @@ void cleanup_menus()
|
|||
gPieMenuMuteParticle = NULL;
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> FIRE-7893: Detach function on inspect self toast without function
|
||||
delete gMenuInspectSelf;
|
||||
gMenuInspectSelf = NULL;
|
||||
// </FS:Ansariel>
|
||||
|
||||
delete gMenuBarView;
|
||||
gMenuBarView = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "llmenugl.h"
|
||||
#include "llsafehandle.h"
|
||||
#include "lltoggleablemenu.h" // <FS:Ansariel> FIRE-7893: Detach function on inspect self toast without function
|
||||
#include "piemenu.h"
|
||||
|
||||
class LLMessageSystem;
|
||||
|
|
@ -248,6 +249,12 @@ extern PieMenu* gPieAttachBodyPartMenus[PIE_MAX_SLICES];
|
|||
extern PieMenu* gPieDetachBodyPartMenus[PIE_MAX_SLICES];
|
||||
// <FS:Zi> Pie Menu
|
||||
|
||||
// <FS:Ansariel> FIRE-7893: Detach function on inspect self toast without function
|
||||
extern LLToggleableMenu *gMenuInspectSelf;
|
||||
extern LLContextMenu *gInspectSelfDetachScreenMenu;
|
||||
extern LLContextMenu *gInspectSelfDetachMenu;
|
||||
// </FS:Ansariel>
|
||||
|
||||
extern LLMenuItemCallGL* gAutorespondMenu;
|
||||
extern LLMenuItemCallGL* gAutorespondNonFriendsMenu;
|
||||
|
||||
|
|
|
|||
|
|
@ -583,6 +583,8 @@ BOOL LLVOAvatarSelf::buildMenus()
|
|||
if (gDetachBodyPartPieMenus[i])
|
||||
{
|
||||
gDetachPieMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] );
|
||||
// <FS:Ansariel> FIRE-7893: "Detach" sub-menu on inspect menu without function
|
||||
gInspectSelfDetachMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -611,6 +613,8 @@ BOOL LLVOAvatarSelf::buildMenus()
|
|||
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
|
||||
|
||||
gDetachPieMenu->addChild(item);
|
||||
// <FS:Ansariel> FIRE-7893: "Detach" sub-menu on inspect menu without function
|
||||
gInspectSelfDetachMenu->addChild(item);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -754,6 +758,8 @@ BOOL LLVOAvatarSelf::buildMenus()
|
|||
item_params.on_enable.parameter = iter->first;
|
||||
item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
|
||||
gDetachScreenPieMenu->addChild(item);
|
||||
// <FS:Ansariel> FIRE-7893: "Detach" sub-menu on inspect menu without function
|
||||
gInspectSelfDetachScreenMenu->addChild(item);
|
||||
|
||||
// <FS:Zi> Pie menu
|
||||
slice_params.name =(slice_params.label );
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
<menu_item_call label="Alpha" name="Self Alpha"/>
|
||||
<menu_item_call label="Alle Kleider" name="All Clothes"/>
|
||||
</context_menu>
|
||||
<context_menu label="HUD" name="Object Detach HUD"/>
|
||||
<context_menu label="Abnehmen" name="Object Detach"/>
|
||||
<context_menu label="HUD" name="Inspect Self Detach HUD"/>
|
||||
<context_menu label="Abnehmen" name="Inspect Self Detach"/>
|
||||
<menu_item_call label="Alles abnehmen" name="Detach All"/>
|
||||
</context_menu>
|
||||
<menu_item_call label="Outfit ändern" name="Chenge Outfit"/>
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@
|
|||
follows="top|left"
|
||||
height="20"
|
||||
image_overlay="OptionsMenu_Off"
|
||||
menu_filename="menu_inspect_self_gear.xml"
|
||||
name="gear_self_btn"
|
||||
right="-5"
|
||||
top_delta="0"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<toggleable_menu
|
||||
layout="topleft"
|
||||
name="Self Pie">
|
||||
name="Gear Menu">
|
||||
<menu_item_call
|
||||
label="Sit Down"
|
||||
layout="topleft"
|
||||
|
|
@ -176,11 +176,11 @@
|
|||
<context_menu
|
||||
label="HUD"
|
||||
layout="topleft"
|
||||
name="Object Detach HUD" />
|
||||
name="Inspect Self Detach HUD" />
|
||||
<context_menu
|
||||
label="Detach"
|
||||
layout="topleft"
|
||||
name="Object Detach" />
|
||||
name="Inspect Self Detach" />
|
||||
<menu_item_call
|
||||
label="Detach All"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue