From 0079c0b281b3f5e18eb072d4badc4aac06e37256 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 16 Apr 2016 00:57:12 +0200 Subject: [PATCH] Animate labels in pie menu during the popup effect; can be disabled via debug setting PieMenuPopupFontEffect --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/piemenu.cpp | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 23bac07554..3ebad4c643 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -109,6 +109,17 @@ Value 1 + PieMenuPopupFontEffect + + Comment + If enabled, the labels in the pie menu slices are affected by the popup effect (they move into position). + Persist + 1 + Type + Boolean + Value + 1 + AutohideChatBar Comment diff --git a/indra/newview/piemenu.cpp b/indra/newview/piemenu.cpp index a02f7bb967..5700d68b85 100644 --- a/indra/newview/piemenu.cpp +++ b/indra/newview/piemenu.cpp @@ -286,6 +286,7 @@ void PieMenu::draw() borderColor = bgColor % (1.f - sPieMenuFade); selectedColor = LLUIColorTable::instance().getColor("PieMenuSelectedColorOverride"); } + static LLCachedControl sPieMenuPopupFontEffect(gSavedSettings, "PieMenuPopupFontEffect"); // on first click, make the menu fade out to indicate "borderless" operation if (mFirstClick) @@ -438,8 +439,8 @@ void PieMenu::draw() // draw the slice labels around the center mFont->renderUTF8(label, 0, - PIE_X[num], - PIE_Y[num], + PIE_X[num] * (sPieMenuPopupFontEffect() ? factor : 1.f), + PIE_Y[num] * (sPieMenuPopupFontEffect() ? factor : 1.f), itemColor, LLFontGL::HCENTER, LLFontGL::VCENTER,