Async medal sprite loading.

This commit is contained in:
DrabWeb
2017-07-11 22:12:49 -03:00
parent 2ee0f3f5f6
commit 16bb96e6aa
2 changed files with 34 additions and 10 deletions

View File

@ -56,6 +56,7 @@ namespace osu.Game.Overlays
{
RelativeSizeAxes = Axes.Both;
Alpha = 0f;
AlwaysPresent = true;
Children = new Drawable[]
{
@ -120,6 +121,7 @@ namespace osu.Game.Overlays
Origin = Anchor.Centre,
Alpha = 0f,
Masking = true,
AlwaysPresent = true,
BorderColour = Color4.White,
BorderThickness = border_width,
Size = new Vector2(DISC_SIZE),
@ -151,6 +153,8 @@ namespace osu.Game.Overlays
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AlwaysPresent = true,
OnSpriteLoadComplete = drawable => Show(),
},
},
},
@ -171,12 +175,6 @@ namespace osu.Game.Overlays
};
}
protected override void LoadComplete()
{
base.LoadComplete();
Show();
}
protected override void Update()
{
base.Update();
@ -247,6 +245,7 @@ namespace osu.Game.Overlays
{
if (drawableMedal.Transforms.Count != 0) return;
Hide();
Expire();
}
private class BackgroundStrip : Container