diff --git a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs index 836d2c5a18..b994dbcf5a 100644 --- a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs @@ -28,6 +28,7 @@ namespace OpenRA.Mods.Common.Widgets } public bool DisableKeyRepeat = false; + public bool DisableKeySound = false; [Translate] public string Text = ""; public string Background = "button"; @@ -141,9 +142,10 @@ namespace OpenRA.Mods.Common.Widgets if (!IsDisabled()) { OnKeyPress(e); - Game.Sound.PlayNotification(ModRules, null, "Sounds", "ClickSound", null); + if (!DisableKeySound) + Game.Sound.PlayNotification(ModRules, null, "Sounds", "ClickSound", null); } - else + else if (!DisableKeySound) Game.Sound.PlayNotification(ModRules, null, "Sounds", "ClickDisabledSound", null); return true;