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:
parent
7805b95a1e
commit
81d9e391f4
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user