Merge pull request #4331 from nyquillerium/ScrollingExitFix

Fix song select background not being exited in time for main menu
This commit is contained in:
Dean Herbert 2019-02-25 19:29:23 +09:00 committed by GitHub
commit 638e89effa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -54,10 +54,10 @@ namespace osu.Game.Screens.Menu
buttons = new ButtonSystem
{
OnChart = delegate { this.Push(new ChartListing()); },
OnDirect = delegate {this.Push(new OnlineListing()); },
OnEdit = delegate {this.Push(new Editor()); },
OnDirect = delegate { this.Push(new OnlineListing()); },
OnEdit = delegate { this.Push(new Editor()); },
OnSolo = onSolo,
OnMulti = delegate {this.Push(new Multiplayer()); },
OnMulti = delegate { this.Push(new Multiplayer()); },
OnExit = this.Exit,
}
}
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Menu
public void LoadToSolo() => Schedule(onSolo);
private void onSolo() =>this.Push(consumeSongSelect());
private void onSolo() => this.Push(consumeSongSelect());
private Screen consumeSongSelect()
{
@ -184,7 +184,7 @@ namespace osu.Game.Screens.Menu
{
base.OnResuming(last);
((BackgroundScreenDefault)Background).Next();
(Background as BackgroundScreenDefault)?.Next();
//we may have consumed our preloaded instance, so let's make another.
preloadSongSelect();
@ -201,7 +201,7 @@ namespace osu.Game.Screens.Menu
{
if (!e.Repeat && e.ControlPressed && e.ShiftPressed && e.Key == Key.D)
{
this.Push(new Drawings());
this.Push(new Drawings());
return true;
}

View File

@ -285,7 +285,7 @@ namespace osu.Game.Screens.Select
public void Edit(BeatmapInfo beatmap = null)
{
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
this.Push(new Editor());
}
@ -509,14 +509,15 @@ namespace osu.Game.Screens.Select
public override bool OnExiting(IScreen next)
{
if (base.OnExiting(next))
return true;
if (ModSelect.State == Visibility.Visible)
{
ModSelect.Hide();
return true;
}
FinaliseSelection(performStartAction: false);
beatmapInfoWedge.State = Visibility.Hidden;
this.FadeOut(100);
@ -529,7 +530,7 @@ namespace osu.Game.Screens.Select
SelectedMods.UnbindAll();
Beatmap.Value.Mods.Value = new Mod[] { };
return base.OnExiting(next);
return false;
}
protected override void Dispose(bool isDisposing)