Ensure that all changes to screen backgrounds are on the correct thread

This commit is contained in:
Dean Herbert
2021-01-04 18:32:23 +09:00
parent a3e4e2f6c3
commit b3f08b29ca
12 changed files with 132 additions and 60 deletions

View File

@ -444,11 +444,14 @@ namespace osu.Game.Screens.Edit
{
base.OnEntering(last);
// todo: temporary. we want to be applying dim using the UserDimContainer eventually.
Background.FadeColour(Color4.DarkGray, 500);
ApplyToBackground(b =>
{
// todo: temporary. we want to be applying dim using the UserDimContainer eventually.
b.FadeColour(Color4.DarkGray, 500);
Background.EnableUserDim.Value = false;
Background.BlurAmount.Value = 0;
b.EnableUserDim.Value = false;
b.BlurAmount.Value = 0;
});
resetTrack(true);
}
@ -480,7 +483,7 @@ namespace osu.Game.Screens.Edit
}
}
Background.FadeColour(Color4.White, 500);
ApplyToBackground(b => b.FadeColour(Color4.White, 500));
resetTrack();
return base.OnExiting(next);