Option in settings to toggle mute/unmute when losing/gaining window focus

This commit is contained in:
aQaTL
2018-01-16 20:33:30 +01:00
parent 9277586907
commit 0340e4f8dc
4 changed files with 48 additions and 1 deletions

View File

@ -91,6 +91,24 @@ namespace osu.Game.Graphics.UserInterface.Volume
schedulePopOut();
}
public bool IsMuted => volumeMeterMaster.IsMuted;
public void Mute()
{
if (!IsMuted)
{
volumeMeterMaster.ToogleMute();
}
}
public void Unmute()
{
if (IsMuted)
{
volumeMeterMaster.ToogleMute();
}
}
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{