1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 19:07:20 +08:00

Fix background dim occasionally getting in a bad state when exiting gameplay

This commit is contained in:
Dean Herbert 2024-01-15 19:21:19 +09:00
parent a3b63391fa
commit 8e32780888
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View File

@ -51,7 +51,7 @@ namespace osu.Game.Screens.Backgrounds
/// </summary>
public readonly Bindable<float> DimWhenUserSettingsIgnored = new Bindable<float>();
internal readonly IBindable<bool> IsBreakTime = new Bindable<bool>();
internal readonly Bindable<bool> IsBreakTime = new Bindable<bool>();
private readonly DimmableBackground dimmable;

View File

@ -1078,7 +1078,7 @@ namespace osu.Game.Screens.Play
b.FadeColour(Color4.White, 250);
// bind component bindables.
b.IsBreakTime.BindTo(breakTracker.IsBreakTime);
((IBindable<bool>)b.IsBreakTime).BindTo(breakTracker.IsBreakTime);
b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
@ -1238,7 +1238,13 @@ namespace osu.Game.Screens.Play
if (this.IsCurrentScreen())
{
ApplyToBackground(b => b.IgnoreUserSettings.Value = true);
ApplyToBackground(b =>
{
b.IgnoreUserSettings.Value = true;
b.IsBreakTime.UnbindFrom(breakTracker.IsBreakTime);
b.IsBreakTime.Value = true;
});
storyboardReplacesBackground.Value = false;
}
}