Do not change depth value of drawables currently contained within a container.

This commit is contained in:
Tom94
2016-11-23 18:30:50 +01:00
committed by Dean Herbert
parent 3e4ff27865
commit 718f2b13a8
4 changed files with 18 additions and 16 deletions

View File

@ -36,18 +36,18 @@ namespace osu.Game.Screens.Backgrounds
newBackground.Preload(Game, delegate
{
Background oldBackground = background;
float newDepth = 0;
if (background != null)
{
newDepth = background.Depth - 1;
background.Flush();
background.FadeOut(250);
background.Expire();
}
newBackground.Depth = newDepth;
Add(background = newBackground);
background.BlurSigma = blurTarget;
if (oldBackground != null)
{
oldBackground.Depth = 1;
oldBackground.Flush();
oldBackground.FadeOut(250);
oldBackground.Expire();
}
});
});
}