From fdf4d97d4d9ce64eee4142e491509106be5b716b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 25 Feb 2009 01:09:07 -0700 Subject: Added menu_pie_hud.xml, removed legacy rate pie menu references --- linden/indra/newview/CMakeLists.txt | 1 + linden/indra/newview/llselectmgr.cpp | 2 +- linden/indra/newview/lltoolpie.cpp | 6 +++++- linden/indra/newview/llviewermenu.cpp | 9 +++++++-- linden/indra/newview/llviewermenu.h | 3 ++- 5 files changed, 16 insertions(+), 5 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 4024fdd..1e48d28 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -1120,6 +1120,7 @@ set(viewer_XUI_FILES skins/default/xui/en-us/menu_login.xml skins/default/xui/en-us/menu_pie_attachment.xml skins/default/xui/en-us/menu_pie_avatar.xml + skins/default/xui/en-us/menu_pie_hud.xml skins/default/xui/en-us/menu_pie_land.xml skins/default/xui/en-us/menu_pie_object.xml skins/default/xui/en-us/menu_pie_self.xml diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 7547dd2..fe1755b 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -3444,7 +3444,7 @@ void LLSelectMgr::deselectAllIfTooFar() // HACK: Don't deselect when we're navigating to rate an object's // owner or creator. JC - if (gPieObject->getVisible() || gPieRate->getVisible() ) + if (gPieObject->getVisible()) { return; } diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index de10045..63b6e34 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -336,10 +336,14 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) gPieAvatar->show(x, y, mPieMouseButtonDown); } - else if (object->isAttachment()) + else if (object->isAttachment() && !object->isHUDAttachment()) { gPieAttachment->show(x, y, mPieMouseButtonDown); } + else if (object->isHUDAttachment()) + { + gPieHUD->show(x, y, mPieMouseButtonDown); + } else { // BUG: What about chatting child objects? diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b7f4a40..31fdcc3 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -251,6 +251,7 @@ LLPieMenu *gPieSelf = NULL; LLPieMenu *gPieAvatar = NULL; LLPieMenu *gPieObject = NULL; LLPieMenu *gPieAttachment = NULL; +LLPieMenu *gPieHUD = NULL; LLPieMenu *gPieLand = NULL; // local constants @@ -263,7 +264,6 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents" LLMenuGL* gAttachSubMenu = NULL; LLMenuGL* gDetachSubMenu = NULL; LLMenuGL* gTakeOffClothes = NULL; -LLPieMenu* gPieRate = NULL; LLPieMenu* gAttachScreenPieMenu = NULL; LLPieMenu* gAttachPieMenu = NULL; LLPieMenu* gAttachBodyPartPieMenus[8]; @@ -610,10 +610,11 @@ void init_menus() gAttachScreenPieMenu = gMenuHolder->getChild("Object Attach HUD"); gAttachPieMenu = gMenuHolder->getChild("Object Attach"); - gPieRate = gMenuHolder->getChild("Rate Menu"); gPieAttachment = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_attachment.xml", gMenuHolder); + gPieHUD = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_hud.xml", gMenuHolder); + gPieLand = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_land.xml", gMenuHolder); /// @@ -626,6 +627,7 @@ void init_menus() gPieAvatar->setBackgroundColor( pie_color ); gPieObject->setBackgroundColor( pie_color ); gPieAttachment->setBackgroundColor( pie_color ); + gPieHUD->setBackgroundColor( pie_color ); gPieLand->setBackgroundColor( pie_color ); color = gColors.getColor( "MenuPopupBgColor" ); @@ -1475,6 +1477,9 @@ void cleanup_menus() delete gPieAttachment; gPieAttachment = NULL; + delete gPieHUD; + gPieHUD = NULL; + delete gPieLand; gPieLand = NULL; diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h index e003e90..c2f880e 100644 --- a/linden/indra/newview/llviewermenu.h +++ b/linden/indra/newview/llviewermenu.h @@ -147,14 +147,15 @@ extern LLPieMenu *gPieSelf; extern LLPieMenu *gPieAvatar; extern LLPieMenu *gPieObject; extern LLPieMenu *gPieAttachment; +extern LLPieMenu *gPieHUD; extern LLPieMenu *gPieLand; -extern LLPieMenu* gPieRate; // Pie menus extern LLPieMenu *gPieSelfSimple; extern LLPieMenu *gPieAvatarSimple; extern LLPieMenu *gPieObjectSimple; extern LLPieMenu *gPieAttachmentSimple; +extern LLPieMenu *gPieHUDSimple; extern LLPieMenu *gPieLandSimple; // Needed to build menus when attachment site list available -- cgit v1.1