Make the mute hotkey global.

This commit is contained in:
Paul Chote
2017-09-03 18:03:02 +00:00
committed by reaperrr
parent c759a68492
commit 25e88008ef
10 changed files with 59 additions and 27 deletions

View File

@@ -292,8 +292,6 @@ namespace OpenRA.Mods.Common.Widgets
return CycleStatusBars();
else if (key == Game.Settings.Keys.TogglePixelDoubleKey)
return TogglePixelDouble();
else if (key == Game.Settings.Keys.ToggleMuteKey)
return ToggleMute();
else if (key == Game.Settings.Keys.TogglePlayerStanceColorsKey)
return TogglePlayerStanceColors();
}
@@ -364,24 +362,6 @@ namespace OpenRA.Mods.Common.Widgets
return true;
}
bool ToggleMute()
{
Game.Settings.Sound.Mute ^= true;
if (Game.Settings.Sound.Mute)
{
Game.Sound.MuteAudio();
Game.AddChatLine(Color.White, "Battlefield Control", "Audio muted");
}
else
{
Game.Sound.UnmuteAudio();
Game.AddChatLine(Color.White, "Battlefield Control", "Audio unmuted");
}
return true;
}
bool TogglePlayerStanceColors()
{
Game.Settings.Game.UsePlayerStanceColors ^= true;