From a33865efce7ddd6b212d120478cc401f7f2bd12e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 4 Dec 2018 12:06:05 +0900 Subject: [PATCH 1/2] Fix home button being cancelled by mod select --- osu.Game/Screens/Select/PlaySongSelect.cs | 14 ++++++++------ osu.Game/Screens/Select/SongSelect.cs | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index b5d333aee4..2c2a3e31bc 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -85,6 +85,14 @@ namespace osu.Game.Screens.Select } } + protected override void ExitFromBack() + { + if (modSelect.State == Visibility.Visible) + modSelect.Hide(); + + base.ExitFromBack(); + } + protected override void UpdateBeatmap(WorkingBeatmap beatmap) { beatmap.Mods.BindTo(selectedMods); @@ -124,12 +132,6 @@ namespace osu.Game.Screens.Select protected override bool OnExiting(Screen next) { - if (modSelect.State == Visibility.Visible) - { - modSelect.Hide(); - return true; - } - if (base.OnExiting(next)) return true; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index f4af4f9068..66540c6900 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -191,13 +191,15 @@ namespace osu.Game.Screens.Select }); 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) { From 415349e6ef0ce2b512322bc40cc630f149017d2e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 4 Dec 2018 12:14:26 +0900 Subject: [PATCH 2/2] Add missing return --- osu.Game/Screens/Select/PlaySongSelect.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 2c2a3e31bc..0e3dfcf284 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -88,7 +88,10 @@ namespace osu.Game.Screens.Select protected override void ExitFromBack() { if (modSelect.State == Visibility.Visible) + { modSelect.Hide(); + return; + } base.ExitFromBack(); }