mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Avoid using load to construct the drawable hierarchy whereever possible.
This commit is contained in:
@ -37,10 +37,6 @@ namespace osu.Game
|
||||
|
||||
public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private void Beatmap_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
@ -65,15 +61,6 @@ namespace osu.Game
|
||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Black"));
|
||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-BlackItalic"));
|
||||
|
||||
AddInternal(ratioContainer = new RatioAdjust());
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
|
||||
};
|
||||
|
||||
Beatmap.ValueChanged += Beatmap_ValueChanged;
|
||||
|
||||
OszArchiveReader.Register();
|
||||
|
||||
@ -85,6 +72,19 @@ namespace osu.Game
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
AddInternal(ratioContainer = new RatioAdjust
|
||||
{
|
||||
Children = new[]
|
||||
{
|
||||
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override void SetHost(BasicGameHost host)
|
||||
{
|
||||
if (Config == null)
|
||||
|
Reference in New Issue
Block a user