mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +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;
|
||||
|
||||
private Screen songSelect;
|
||||
|
||||
private MenuSideFlashes sideFlashes;
|
||||
|
||||
protected ButtonSystem Buttons;
|
||||
@ -220,26 +218,11 @@ namespace osu.Game.Screens.Menu
|
||||
Buttons.OnBeatmapListing = () => beatmapListing?.ToggleVisibility();
|
||||
|
||||
reappearSampleSwoosh = audio.Samples.Get(@"Menu/reappear-swoosh");
|
||||
|
||||
preloadSongSelect();
|
||||
}
|
||||
|
||||
public void ReturnToOsuLogo() => Buttons.State = ButtonSystemState.Initial;
|
||||
|
||||
private void preloadSongSelect()
|
||||
{
|
||||
if (songSelect == null)
|
||||
LoadComponentAsync(songSelect = new PlaySongSelect());
|
||||
}
|
||||
|
||||
private void loadSoloSongSelect() => this.Push(consumeSongSelect());
|
||||
|
||||
private Screen consumeSongSelect()
|
||||
{
|
||||
var s = songSelect;
|
||||
songSelect = null;
|
||||
return s;
|
||||
}
|
||||
private void loadSoloSongSelect() => this.Push(new PlaySongSelect());
|
||||
|
||||
public override void OnEntering(ScreenTransitionEvent e)
|
||||
{
|
||||
@ -373,9 +356,6 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
ApplyToBackground(b => (b as BackgroundScreenDefault)?.Next());
|
||||
|
||||
// we may have consumed our preloaded instance, so let's make another.
|
||||
preloadSongSelect();
|
||||
|
||||
musicController.EnsurePlayingSomething();
|
||||
|
||||
// Cycle tip on resuming
|
||||
|
Loading…
Reference in New Issue
Block a user