mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:07:44 +08:00
Move async loading to a higher level to simplify logic
This commit is contained in:
parent
980fb18ed6
commit
133bcdec7a
@ -15,12 +15,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
AddStep(@"display", () =>
|
AddStep(@"display", () =>
|
||||||
{
|
{
|
||||||
Add(new MedalOverlay(new Medal
|
LoadComponentAsync(new MedalOverlay(new Medal
|
||||||
{
|
{
|
||||||
Name = @"Animations",
|
Name = @"Animations",
|
||||||
InternalName = @"all-intro-doubletime",
|
InternalName = @"all-intro-doubletime",
|
||||||
Description = @"More complex than you think.",
|
Description = @"More complex than you think.",
|
||||||
}));
|
}), Add);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,18 +155,20 @@ namespace osu.Game.Overlays
|
|||||||
Radius = 50,
|
Radius = 50,
|
||||||
};
|
};
|
||||||
|
|
||||||
LoadComponentAsync(drawableMedal = new DrawableMedal(medal)
|
disc.Add(drawableMedal = new DrawableMedal(medal)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
}, m =>
|
|
||||||
{
|
|
||||||
disc.Add(m);
|
|
||||||
Show();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
Loading…
Reference in New Issue
Block a user