diff --git a/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs b/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs index eabc6db7f4..74730636e4 100644 --- a/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ScrollPanelWidget.cs @@ -45,6 +45,7 @@ namespace OpenRA.Mods.Common.Widgets public int ItemSpacing = 0; public int ButtonDepth = ChromeMetrics.Get("ButtonDepth"); public string ClickSound = ChromeMetrics.Get("ClickSound"); + public string ClickDisabledSound = ChromeMetrics.Get("ClickDisabledSound"); public string Background = "scrollpanel-bg"; public string ScrollBarBackground = "scrollpanel-bg"; public string Button = "scrollpanel-button"; @@ -385,8 +386,13 @@ namespace OpenRA.Mods.Common.Widgets if (thumbPressed) lastMouseLocation = mi.Location; - if (mi.Event == MouseInputEvent.Down && ((upPressed && !upDisabled) || (downPressed && !downDisabled) || thumbPressed)) - Game.Sound.PlayNotification(modRules, null, "Sounds", ClickSound, null); + if (mi.Event == MouseInputEvent.Down) + { + if (thumbPressed || (upPressed && !upDisabled) || (downPressed && !downDisabled)) + Game.Sound.PlayNotification(modRules, null, "Sounds", ClickSound, null); + else if ((upPressed && upDisabled) || (downPressed && downDisabled)) + Game.Sound.PlayNotification(modRules, null, "Sounds", ClickDisabledSound, null); + } } return upPressed || downPressed || thumbPressed;