ContextMenu Support!

LLContextMenu functionality pulled out of LLPieMenu, PieMenu is now derived from LLContextMenu
- The more attribute boolean of pie_menu element determines whether or not to have an actual submenu if it's not a pie, defaults to false which means actual submenu..
-- in the future we may want to have more more="true" depending on feedback
- Pie menu labels now dynamically get " >" appended to them (avoids stupid looking context menus)
- Positioning logic combined in part, mostly conditional still, in the future we could probably combine it more.
- handleHoverOver function combines common functionality between context and pies given an item and hover mouse coords.

LiruUseContextMenus debug setting determines which to use, default is pie, of course
- Context(/Pie) Menus are rebuilt when the setting changes value
-- this is safe at any point because all startup states have been accounted for
- "Use context menus instead of pie menus" added to System->General preferences (it's close to the bottom)
This commit is contained in:
Inusaito Sayori
2013-11-06 18:47:02 -05:00
parent f41c4dd273
commit 511b0cfb9c
31 changed files with 656 additions and 411 deletions

View File

@@ -1101,7 +1101,7 @@ BOOL LLToolPie::handleRightClickPick()
{
LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal );
gMenuHolder->setParcelSelection(selection);
gPieLand->show(x, y, true);
gPieLand->show(x, y);
showVisualContextMenuEffect();
@@ -1115,7 +1115,7 @@ BOOL LLToolPie::handleRightClickPick()
return TRUE ;
}
gPieSelf->show(x, y, true);
gPieSelf->show(x, y);
}
else if (object)
{
@@ -1159,11 +1159,11 @@ BOOL LLToolPie::handleRightClickPick()
// [/RLVa:KB]
/*if (is_other_attachment)
{
gPieAttachmentOther->show(x, y, true);
gPieAttachmentOther->show(x, y);
}
else*/
{
gPieAvatar->show(x, y, true);
gPieAvatar->show(x, y);
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
}
@@ -1175,7 +1175,7 @@ BOOL LLToolPie::handleRightClickPick()
}
else if (object->isAttachment())
{
gPieAttachment->show(x, y, true);
gPieAttachment->show(x, y);
}
else
{
@@ -1204,7 +1204,7 @@ BOOL LLToolPie::handleRightClickPick()
{
// [/RLVa:KB]
gMenuHolder->childSetText("Object Mute", mute_msg);
gPieObject->show(x, y, true);
gPieObject->show(x, y);
showVisualContextMenuEffect();
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.el) | Modified: RLVa-1.1.0l