From 94cd34cc1762fbcc88930f095fb89b9ae4292928 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 8 Jul 2020 20:29:44 +0300 Subject: SL-13479 Avatar menu tweaks --- indra/llui/llmenugl.cpp | 4 +- indra/newview/llviewermenu.cpp | 10 + indra/newview/llviewermenu.h | 4 + indra/newview/llvoavatarself.cpp | 8 +- .../skins/default/xui/en/menu_attachment_self.xml | 210 +++++++++++++++++++-- .../skins/default/xui/en/menu_avatar_self.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 186 +++++++++++++++++- 7 files changed, 404 insertions(+), 20 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 5568a84494..c2698fa648 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -79,7 +79,7 @@ const U32 LEFT_PAD_PIXELS = 3; const U32 LEFT_WIDTH_PIXELS = 15; const U32 LEFT_PLAIN_PIXELS = LEFT_PAD_PIXELS + LEFT_WIDTH_PIXELS; -const U32 RIGHT_PAD_PIXELS = 2; +const U32 RIGHT_PAD_PIXELS = 7; const U32 RIGHT_WIDTH_PIXELS = 15; const U32 RIGHT_PLAIN_PIXELS = RIGHT_PAD_PIXELS + RIGHT_WIDTH_PIXELS; @@ -95,7 +95,7 @@ const std::string SEPARATOR_NAME("separator"); const std::string VERTICAL_SEPARATOR_LABEL( "|" ); const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK -const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE +const std::string LLMenuGL::BRANCH_SUFFIX( "\xe2\x96\xb8" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE const std::string LLMenuGL::ARROW_UP ("^^^^^^^"); const std::string LLMenuGL::ARROW_DOWN("vvvvvvv"); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 34b4d7f3b3..12d13a78a2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -186,11 +186,15 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents" LLMenuGL* gAttachSubMenu = NULL; LLMenuGL* gDetachSubMenu = NULL; LLMenuGL* gTakeOffClothes = NULL; +LLMenuGL* gDetachAvatarMenu = NULL; +LLMenuGL* gDetachHUDAvatarMenu = NULL; LLContextMenu* gAttachScreenPieMenu = NULL; LLContextMenu* gAttachPieMenu = NULL; LLContextMenu* gAttachBodyPartPieMenus[9]; LLContextMenu* gDetachPieMenu = NULL; LLContextMenu* gDetachScreenPieMenu = NULL; +LLContextMenu* gDetachAttSelfMenu = NULL; +LLContextMenu* gDetachHUDAttSelfMenu = NULL; LLContextMenu* gDetachBodyPartPieMenus[9]; // @@ -445,6 +449,9 @@ void init_menus() gMenuAttachmentOther = LLUICtrlFactory::createFromFile( "menu_attachment_other.xml", gMenuHolder, registry); + gDetachHUDAttSelfMenu = gMenuHolder->getChild("Detach Self HUD", true); + gDetachAttSelfMenu = gMenuHolder->getChild("Detach Self", true); + gMenuLand = LLUICtrlFactory::createFromFile( "menu_land.xml", gMenuHolder, registry); @@ -501,6 +508,9 @@ void init_menus() gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); + gDetachAvatarMenu = gMenuHolder->getChild("Avatar Detach", true); + gDetachHUDAvatarMenu = gMenuHolder->getChild("Avatar Detach HUD", true); + // Don't display the Memory console menu if the feature is turned off LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", TRUE); if (memoryMenu) diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 0f63c8cf58..36b6971c81 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -188,10 +188,14 @@ extern LLContextMenu *gMenuMuteParticle; extern LLMenuGL* gAttachSubMenu; extern LLMenuGL* gDetachSubMenu; extern LLMenuGL* gTakeOffClothes; +extern LLMenuGL* gDetachAvatarMenu; +extern LLMenuGL* gDetachHUDAvatarMenu; extern LLContextMenu* gAttachScreenPieMenu; extern LLContextMenu* gDetachScreenPieMenu; +extern LLContextMenu* gDetachHUDAttSelfMenu; extern LLContextMenu* gAttachPieMenu; extern LLContextMenu* gDetachPieMenu; +extern LLContextMenu* gDetachAttSelfMenu; extern LLContextMenu* gAttachBodyPartPieMenus[9]; extern LLContextMenu* gDetachBodyPartPieMenus[9]; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index aea12380e8..d2dc139d4b 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -465,6 +465,8 @@ BOOL LLVOAvatarSelf::buildMenus() if (gDetachBodyPartPieMenus[i]) { gDetachPieMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] ); + gDetachAttSelfMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]); + gDetachAvatarMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]); } else { @@ -493,12 +495,14 @@ BOOL LLVOAvatarSelf::buildMenus() LLMenuItemCallGL* item = LLUICtrlFactory::create(item_params); gDetachPieMenu->addChild(item); - + gDetachAttSelfMenu->addChild(LLUICtrlFactory::create(item_params)); + gDetachAvatarMenu->addChild(LLUICtrlFactory::create(item_params)); break; } } } } + // add screen attachments for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); @@ -532,6 +536,8 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.on_enable.parameter = iter->first; item = LLUICtrlFactory::create(item_params); gDetachScreenPieMenu->addChild(item); + gDetachHUDAttSelfMenu->addChild(LLUICtrlFactory::create(item_params)); + gDetachHUDAvatarMenu->addChild(LLUICtrlFactory::create(item_params)); } } diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 03c05e6591..856bf4ce73 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -2,17 +2,6 @@ - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -293,7 +475,7 @@ name="Help with avatars"> + parameter="https://community.secondlife.com/search/?type=cms_records3&tags=avatar&nodes=30&search_and_or=or"/>