mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 21:03:21 +08:00
Remove song select preloading
Really unnecessary now.
This commit is contained in:
parent
c2c1dccf2d
commit
5ed0c6e91a
@ -54,8 +54,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public override bool? AllowGlobalTrackControl => true;
|
public override bool? AllowGlobalTrackControl => true;
|
||||||
|
|
||||||
private Screen songSelect;
|
|
||||||
|
|
||||||
private MenuSideFlashes sideFlashes;
|
private MenuSideFlashes sideFlashes;
|
||||||
|
|
||||||
protected ButtonSystem Buttons;
|
protected ButtonSystem Buttons;
|
||||||
@ -220,26 +218,11 @@ namespace osu.Game.Screens.Menu
|
|||||||
Buttons.OnBeatmapListing = () => beatmapListing?.ToggleVisibility();
|
Buttons.OnBeatmapListing = () => beatmapListing?.ToggleVisibility();
|
||||||
|
|
||||||
reappearSampleSwoosh = audio.Samples.Get(@"Menu/reappear-swoosh");
|
reappearSampleSwoosh = audio.Samples.Get(@"Menu/reappear-swoosh");
|
||||||
|
|
||||||
preloadSongSelect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReturnToOsuLogo() => Buttons.State = ButtonSystemState.Initial;
|
public void ReturnToOsuLogo() => Buttons.State = ButtonSystemState.Initial;
|
||||||
|
|
||||||
private void preloadSongSelect()
|
private void loadSoloSongSelect() => this.Push(new PlaySongSelect());
|
||||||
{
|
|
||||||
if (songSelect == null)
|
|
||||||
LoadComponentAsync(songSelect = new PlaySongSelect());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadSoloSongSelect() => this.Push(consumeSongSelect());
|
|
||||||
|
|
||||||
private Screen consumeSongSelect()
|
|
||||||
{
|
|
||||||
var s = songSelect;
|
|
||||||
songSelect = null;
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnEntering(ScreenTransitionEvent e)
|
public override void OnEntering(ScreenTransitionEvent e)
|
||||||
{
|
{
|
||||||
@ -373,9 +356,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
ApplyToBackground(b => (b as BackgroundScreenDefault)?.Next());
|
ApplyToBackground(b => (b as BackgroundScreenDefault)?.Next());
|
||||||
|
|
||||||
// we may have consumed our preloaded instance, so let's make another.
|
|
||||||
preloadSongSelect();
|
|
||||||
|
|
||||||
musicController.EnsurePlayingSomething();
|
musicController.EnsurePlayingSomething();
|
||||||
|
|
||||||
// Cycle tip on resuming
|
// Cycle tip on resuming
|
||||||
|
Loading…
Reference in New Issue
Block a user