Make the mute hotkey global.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user