ClickSound and ClickDisabledSound and ChatLine are optional ui sounds.

This commit is contained in:
Andre Mohren
2018-07-26 15:37:25 +02:00
committed by reaperrr
parent 28623ce54c
commit 48248266a8
14 changed files with 68 additions and 18 deletions

View File

@@ -38,6 +38,7 @@ namespace OpenRA.Mods.Common.Widgets
public int TopBottomSpacing = 2;
public int ItemSpacing = 0;
public int ButtonDepth = ChromeMetrics.Get<int>("ButtonDepth");
public string ClickSound = ChromeMetrics.Get<string>("ClickSound");
public string Background = "scrollpanel-bg";
public string Button = "scrollpanel-button";
public int ContentHeight;
@@ -323,7 +324,7 @@ namespace OpenRA.Mods.Common.Widgets
lastMouseLocation = mi.Location;
if (mi.Event == MouseInputEvent.Down && ((upPressed && !upDisabled) || (downPressed && !downDisabled) || thumbPressed))
Game.Sound.PlayNotification(modRules, null, "Sounds", "ClickSound", null);
Game.Sound.PlayNotification(modRules, null, "Sounds", ClickSound, null);
}
return upPressed || downPressed || thumbPressed;