From ad4c9babe791346402a193c0de2dd4f5d4c10b8e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 Jun 2019 23:24:52 +0900 Subject: [PATCH] Adjust naming and transitions --- osu.Game/OsuGame.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 978d9cc20c..7f9da9a645 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -181,7 +181,7 @@ namespace osu.Game configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default; configSkin.TriggerChange(); - LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolume); + LocalConfig.BindWith(OsuSetting.VolumeInactive, userInactiveVolume); IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); } @@ -686,21 +686,21 @@ namespace osu.Game return false; } - private readonly BindableDouble inactiveVolume = new BindableDouble(); + private readonly BindableDouble userInactiveVolume = new BindableDouble(); - private readonly BindableDouble inactiveVolAdjust = new BindableDouble(); + private readonly BindableDouble inactiveVolumeFade = new BindableDouble(); private void updateActiveState(bool isActive) { if (isActive) { - this.TransformBindableTo(inactiveVolAdjust, 1, 750, Easing.In) - .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolAdjust)); //wait for the transition to finish to remove the inactive audio adjustement + this.TransformBindableTo(inactiveVolumeFade, 1, 500, Easing.OutQuint) + .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeFade)); //wait for the transition to finish to remove the inactive audio adjustement } else { - Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolAdjust); - this.TransformBindableTo(inactiveVolAdjust, inactiveVolume.Value, 750, Easing.Out); + Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); + this.TransformBindableTo(inactiveVolumeFade, userInactiveVolume.Value, 1500, Easing.OutSine); } }