mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add new main menu backgrounds
This commit is contained in:
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Charts;
|
||||
@ -24,7 +25,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
internal override bool ShowOverlays => buttons.State != MenuState.Initial;
|
||||
|
||||
private readonly BackgroundScreen background;
|
||||
private readonly BackgroundScreenDefault background;
|
||||
private Screen songSelect;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => background;
|
||||
@ -66,6 +67,12 @@ namespace osu.Game.Screens.Menu
|
||||
preloadSongSelect();
|
||||
}
|
||||
|
||||
protected override void OnBeatmapChanged(WorkingBeatmap beatmap)
|
||||
{
|
||||
base.OnBeatmapChanged(beatmap);
|
||||
background.Next();
|
||||
}
|
||||
|
||||
private void preloadSongSelect()
|
||||
{
|
||||
if (songSelect == null)
|
||||
@ -111,6 +118,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
base.OnResuming(last);
|
||||
|
||||
background.Next();
|
||||
|
||||
//we may have consumed our preloaded instance, so let's make another.
|
||||
preloadSongSelect();
|
||||
|
||||
|
Reference in New Issue
Block a user