Make pie menu outer ring shade optional

master
Ansariel 2016-05-17 14:14:27 +02:00
parent 48356e21d4
commit 97ebcdbb6e
4 changed files with 32 additions and 2 deletions

View File

@ -120,6 +120,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>PieMenuOuterRingShade</key>
<map>
<key>Comment</key>
<string>If enabled, a shade around the outside of the pie menu will be drawn, adding a further visualization of sub menus.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AutohideChatBar</key>
<map>
<key>Comment</key>

View File

@ -288,6 +288,7 @@ void PieMenu::draw()
selectedColor = LLUIColorTable::instance().getColor("PieMenuSelectedColorOverride");
}
static LLCachedControl<bool> sPieMenuPopupFontEffect(gSavedSettings, "PieMenuPopupFontEffect");
static LLCachedControl<bool> sPieMenuOuterRingShade(gSavedSettings, "PieMenuOuterRingShade");
// on first click, make the menu fade out to indicate "borderless" operation
if (mFirstClick)
@ -410,7 +411,10 @@ void PieMenu::draw()
else if (currentSubmenu)
{
label = currentSubmenu->getLabel();
gl_washer_segment_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor, segmentStart + 0.02f, segmentStart + F_PI / 4.f - 0.02f, steps / 8, selectedColor, selectedColor);
if (sPieMenuOuterRingShade)
{
gl_washer_segment_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor, segmentStart + 0.02f, segmentStart + F_PI / 4.f - 0.02f, steps / 8, selectedColor, selectedColor);
}
}
// if it's a slice or submenu, the mouse pointer is over the same segment as our counter and the item is enabled
@ -457,7 +461,10 @@ void PieMenu::draw()
if (!mFirstClick)
{
gl_washer_2d(PIE_OUTER_SIZE * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
gl_washer_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
if (sPieMenuOuterRingShade)
{
gl_washer_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
}
}
gl_washer_2d(PIE_INNER_SIZE + 1, PIE_INNER_SIZE - 1, steps, borderColor, lineColor);

View File

@ -60,6 +60,7 @@
<slider label_width="190" width="430" label="Sichtbare Zeilen pro Skriptdialog:" name="FSRowsPerScriptDialog" tool_tip="Die maximale Anzahl an Zeilen in einem Skriptdialog, die gleichzeitig sichtbar sind."/>
<check_box label="Pie-Menü aktivieren" name="UsePieMenu" tool_tip="Aktiviert das klassische V1-Kontextmenü in Kuchenform anstelle des standardmäßigen Kontextmenüs."/>
<check_box label="Text-Animation aktivieren" name="PieMenuPopupFontEffect" tool_tip="Aktiviert die Animation der Texte innerhalb des klassischen V1-Kontextmenü in Kuchenform, wenn sich dieses öffnet."/>
<check_box label="Außenring-Schatten aktivieren" name="PieMenuOuterRingShade" tool_tip="Aktiviert einen zusätzlichen Schatten um den äußeren Ring des klassischen V1-Kontextmenü in Kuchenform, der bei der Visualisierung von Untermenüs unterstützt."/>
<check_box label="Gruppenmitteilungen und Chiclets oben rechts" name="ShowGroupNoticesTopRight" tool_tip="Aktivieren, um Gruppenmitteilungen in der oberen rechten Ecke des Bildschirms anzuzeigen (Klassisches V1.x-Verhalten)."/>
<text name="GroupTopRightRequiresRestart" left_delta="280">
(Erfordert Neustart)

View File

@ -414,6 +414,17 @@
name="PieMenuPopupFontEffect"
tool_tip="Enables the text within the pie menu being part of the animation when the pie menu opens."
top_pad="3"
width="256" />
<check_box
control_name="PieMenuOuterRingShade"
enabled_control="UsePieMenu"
height="16"
label="Enable outer ring shade"
layout="topleft"
left="15"
name="PieMenuOuterRingShade"
tool_tip="Enables an additional outer ring shade that helps visualizing sub menus."
top_pad="3"
width="256" />
<check_box
control_name="ShowGroupNoticesTopRight"