Make pie menu outer ring shade optional

Tue, 17 May 2016 14:14:27 +0200

author
Ansariel
date
Tue, 17 May 2016 14:14:27 +0200
changeset 48991
596fedc4b256
parent 48990
553241ad9ce2
child 48992
f6cdde4e9976

Make pie menu outer ring shade optional

indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/piemenu.cpp file | annotate | diff | revisions
indra/newview/skins/default/xui/de/panel_preferences_UI.xml file | annotate | diff | revisions
indra/newview/skins/default/xui/en/panel_preferences_UI.xml file | annotate | diff | revisions
     1.1 --- a/indra/newview/app_settings/settings.xml	Tue May 17 12:29:36 2016 +0200
     1.2 +++ b/indra/newview/app_settings/settings.xml	Tue May 17 14:14:27 2016 +0200
     1.3 @@ -120,6 +120,17 @@
     1.4      <key>Value</key>
     1.5      <integer>1</integer>
     1.6    </map>
     1.7 +  <key>PieMenuOuterRingShade</key>
     1.8 +  <map>
     1.9 +    <key>Comment</key>
    1.10 +    <string>If enabled, a shade around the outside of the pie menu will be drawn, adding a further visualization of sub menus.</string>
    1.11 +    <key>Persist</key>
    1.12 +    <integer>1</integer>
    1.13 +    <key>Type</key>
    1.14 +    <string>Boolean</string>
    1.15 +    <key>Value</key>
    1.16 +    <integer>1</integer>
    1.17 +  </map>
    1.18    <key>AutohideChatBar</key>
    1.19    <map>
    1.20      <key>Comment</key>
     2.1 --- a/indra/newview/piemenu.cpp	Tue May 17 12:29:36 2016 +0200
     2.2 +++ b/indra/newview/piemenu.cpp	Tue May 17 14:14:27 2016 +0200
     2.3 @@ -288,6 +288,7 @@
     2.4  		selectedColor = LLUIColorTable::instance().getColor("PieMenuSelectedColorOverride");
     2.5  	}
     2.6  	static LLCachedControl<bool> sPieMenuPopupFontEffect(gSavedSettings, "PieMenuPopupFontEffect");
     2.7 +	static LLCachedControl<bool> sPieMenuOuterRingShade(gSavedSettings, "PieMenuOuterRingShade");
     2.8  
     2.9  	// on first click, make the menu fade out to indicate "borderless" operation
    2.10  	if (mFirstClick)
    2.11 @@ -410,7 +411,10 @@
    2.12  			else if (currentSubmenu)
    2.13  			{
    2.14  				label = currentSubmenu->getLabel();
    2.15 -				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);
    2.16 +				if (sPieMenuOuterRingShade)
    2.17 +				{
    2.18 +					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);
    2.19 +				}
    2.20  			}
    2.21  
    2.22  			// if it's a slice or submenu, the mouse pointer is over the same segment as our counter and the item is enabled
    2.23 @@ -457,7 +461,10 @@
    2.24  	if (!mFirstClick)
    2.25  	{
    2.26  		gl_washer_2d(PIE_OUTER_SIZE * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
    2.27 -		gl_washer_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
    2.28 +		if (sPieMenuOuterRingShade)
    2.29 +		{
    2.30 +			gl_washer_2d(PIE_OUTER_SIZE * PIE_OUTER_SHADE_FACTOR * factor, PIE_OUTER_SIZE * factor - 2.f, steps, lineColor, borderColor);
    2.31 +		}
    2.32  	}
    2.33  	gl_washer_2d(PIE_INNER_SIZE + 1, PIE_INNER_SIZE - 1, steps, borderColor, lineColor);
    2.34  
     3.1 --- a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml	Tue May 17 12:29:36 2016 +0200
     3.2 +++ b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml	Tue May 17 14:14:27 2016 +0200
     3.3 @@ -60,6 +60,7 @@
     3.4  		<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."/>
     3.5  		<check_box label="Pie-Menü aktivieren" name="UsePieMenu" tool_tip="Aktiviert das klassische V1-Kontextmenü in Kuchenform anstelle des standardmäßigen Kontextmenüs."/>
     3.6  		<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."/>
     3.7 +		<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."/>
     3.8  		<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)."/>
     3.9  		<text name="GroupTopRightRequiresRestart" left_delta="280">
    3.10  			(Erfordert Neustart)
     4.1 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml	Tue May 17 12:29:36 2016 +0200
     4.2 +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml	Tue May 17 14:14:27 2016 +0200
     4.3 @@ -415,6 +415,17 @@
     4.4         tool_tip="Enables the text within the pie menu being part of the animation when the pie menu opens."
     4.5         top_pad="3"
     4.6         width="256" />
     4.7 +      <check_box
     4.8 +       control_name="PieMenuOuterRingShade"
     4.9 +       enabled_control="UsePieMenu"
    4.10 +       height="16"
    4.11 +       label="Enable outer ring shade"
    4.12 +       layout="topleft"
    4.13 +       left="15"
    4.14 +       name="PieMenuOuterRingShade"
    4.15 +       tool_tip="Enables an additional outer ring shade that helps visualizing sub menus."
    4.16 +       top_pad="3"
    4.17 +       width="256" />
    4.18          <check_box
    4.19           control_name="ShowGroupNoticesTopRight"
    4.20           height="16"

mercurial