Move medal loading to LoadComplete

This commit is contained in:
Andrei Zavatski
2020-01-04 18:45:34 +03:00
parent 0a9d14826c
commit 9fb29cc7a7

View File

@ -154,19 +154,22 @@ namespace osu.Game.Overlays
Colour = colours.Blue.Opacity(0.5f), Colour = colours.Blue.Opacity(0.5f),
Radius = 50, Radius = 50,
}; };
}
protected override void LoadComplete()
{
base.LoadComplete();
LoadComponentAsync(drawableMedal = new DrawableMedal(medal) LoadComponentAsync(drawableMedal = new DrawableMedal(medal)
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, disc.Add); }, loaded =>
} {
disc.Add(loaded);
protected override void LoadComplete() Show();
{ });
base.LoadComplete();
Show();
} }
protected override void Update() protected override void Update()