Ensure editor background is dimmed after return from gameplay test

This commit is contained in:
Bartłomiej Dach
2021-11-13 13:50:57 +01:00
parent b47c0b63f4
commit eb8c5292d5
2 changed files with 18 additions and 2 deletions

View File

@ -487,7 +487,18 @@ namespace osu.Game.Screens.Edit
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
dimBackground();
resetTrack(true);
}
public override void OnResuming(IScreen last)
{
base.OnResuming(last);
dimBackground();
}
private void dimBackground()
{
ApplyToBackground(b =>
{
// todo: temporary. we want to be applying dim using the UserDimContainer eventually.
@ -496,8 +507,6 @@ namespace osu.Game.Screens.Edit
b.IgnoreUserSettings.Value = true;
b.BlurAmount.Value = 0;
});
resetTrack(true);
}
public override bool OnExiting(IScreen next)