1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Preload main menu background

This commit is contained in:
Dean Herbert 2019-03-12 00:04:19 +09:00
parent 7805b95a1e
commit 81d9e391f4

View File

@ -40,7 +40,9 @@ namespace osu.Game.Screens.Menu
[Resolved]
private GameHost host { get; set; }
protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault();
private BackgroundScreenDefault background;
protected override BackgroundScreen CreateBackground() => background;
[BackgroundDependencyLoader(true)]
private void load(OsuGame game = null)
@ -89,6 +91,7 @@ namespace osu.Game.Screens.Menu
buttons.OnDirect = game.ToggleDirect;
}
LoadComponentAsync(background = new BackgroundScreenDefault());
preloadSongSelect();
}