Merge pull request #3816 from peppy/fix-home-button-cancel

Fix home button being cancelled by mod select
This commit is contained in:
Dan Balasescu 2018-12-04 19:41:03 +09:00 committed by GitHub
commit b2d1c66746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View File

@ -85,6 +85,17 @@ private void load(OsuColour colours, AudioManager audio, BeatmapManager beatmaps
}
}
protected override void ExitFromBack()
{
if (modSelect.State == Visibility.Visible)
{
modSelect.Hide();
return;
}
base.ExitFromBack();
}
protected override void UpdateBeatmap(WorkingBeatmap beatmap)
{
beatmap.Mods.BindTo(selectedMods);
@ -124,12 +135,6 @@ protected override void OnSuspending(Screen next)
protected override bool OnExiting(Screen next)
{
if (modSelect.State == Visibility.Visible)
{
modSelect.Hide();
return true;
}
if (base.OnExiting(next))
return true;

View File

@ -191,13 +191,15 @@ protected SongSelect()
});
Add(Footer = new Footer
{
OnBack = Exit,
OnBack = ExitFromBack,
});
FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay());
}
}
protected virtual void ExitFromBack() => Exit();
[BackgroundDependencyLoader(true)]
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuColour colours)
{