mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Merge pull request #26544 from peppy/fix-background-dim-failure
Fix background dim occasionally getting in a bad state when exiting gameplay
This commit is contained in:
commit
64e94a8b6c
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Bindable<float> DimWhenUserSettingsIgnored = new Bindable<float>();
|
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;
|
private readonly DimmableBackground dimmable;
|
||||||
|
|
||||||
|
@ -1078,7 +1078,7 @@ namespace osu.Game.Screens.Play
|
|||||||
b.FadeColour(Color4.White, 250);
|
b.FadeColour(Color4.White, 250);
|
||||||
|
|
||||||
// bind component bindables.
|
// bind component bindables.
|
||||||
b.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
((IBindable<bool>)b.IsBreakTime).BindTo(breakTracker.IsBreakTime);
|
||||||
|
|
||||||
b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||||
|
|
||||||
@ -1238,7 +1238,13 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
if (this.IsCurrentScreen())
|
if (this.IsCurrentScreen())
|
||||||
{
|
{
|
||||||
ApplyToBackground(b => b.IgnoreUserSettings.Value = true);
|
ApplyToBackground(b =>
|
||||||
|
{
|
||||||
|
b.IgnoreUserSettings.Value = true;
|
||||||
|
|
||||||
|
b.IsBreakTime.UnbindFrom(breakTracker.IsBreakTime);
|
||||||
|
b.IsBreakTime.Value = false;
|
||||||
|
});
|
||||||
storyboardReplacesBackground.Value = false;
|
storyboardReplacesBackground.Value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user