mirror of
https://github.com/ppy/osu.git
synced 2026-05-23 02:39:52 +08:00
Option in settings to toggle mute/unmute when losing/gaining window focus
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user