mirror of
https://github.com/ppy/osu
synced 2025-01-30 01:42:54 +00:00
Use Bindable instead of bool
This commit is contained in:
parent
00e46fdefe
commit
811a08d18f
@ -32,11 +32,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
private readonly BindableDouble muteAdjustment = new BindableDouble();
|
||||
|
||||
public bool IsMuted
|
||||
{
|
||||
get => muteButton.Current.Value;
|
||||
set => muteButton.Current.Value = value;
|
||||
}
|
||||
public Bindable<bool> IsMuted => muteButton.Current;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuColour colours)
|
||||
|
@ -159,7 +159,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void checkVolume(AudioManager audio)
|
||||
{
|
||||
if (volumeOverlay.IsMuted || audio.Volume.Value <= audio.Volume.MinValue || audio.VolumeTrack.Value <= audio.VolumeTrack.MinValue)
|
||||
if (volumeOverlay.IsMuted.Value || audio.Volume.Value <= audio.Volume.MinValue || audio.VolumeTrack.Value <= audio.VolumeTrack.MinValue)
|
||||
notificationOverlay.Post(new MutedNotification());
|
||||
}
|
||||
|
||||
@ -513,7 +513,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
notificationOverlay.Hide();
|
||||
|
||||
volumeOverlay.IsMuted = false;
|
||||
volumeOverlay.IsMuted.Value = false;
|
||||
audioManager.Volume.SetDefault();
|
||||
audioManager.VolumeTrack.SetDefault();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user