diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs index af774771437b..9342d4d0aaa3 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs @@ -315,6 +315,26 @@ public void TestOpenModSelectOverlayUsingAction() AddAssert("Overlay was shown", () => Game!.ChildrenOfType().Single().State.Value == Visibility.Visible); } + [Test] + public void TestFooterButtonsAfterModSelectForceExit() + { + Screens.Select.SongSelect songSelect = null; + MainMenu mainMenu = null; + + AddUntilStep("get main menu", () => (mainMenu = Game.ScreenStack.CurrentScreen as MainMenu) != null); + PushAndConfirm(() => songSelect = new SoloSongSelect()); + AddStep("show mods overlay", () => InputManager.Key(Key.F1)); + + // follows alt-f4 code path behavior, can't use home or `game.AttemptExit()` as those run `CloseAllOverlays()` + AddStep("force exit song select", () => mainMenu.MakeCurrent()); + + AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).GetResultSafely()); + PushAndConfirm(() => new SoloSongSelect()); + AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented); + AddStep("show options", () => InputManager.Key(Key.F3)); + AddAssert("options is shown", () => Game!.ChildrenOfType().Single().State.Value, () => Is.EqualTo(Visibility.Visible)); + } + [Test] public void TestAttemptPlayBeatmapWrongHashFails() { diff --git a/osu.Game/Screens/Footer/ScreenFooter.cs b/osu.Game/Screens/Footer/ScreenFooter.cs index 0cc86901c836..ec31b4ccdf04 100644 --- a/osu.Game/Screens/Footer/ScreenFooter.cs +++ b/osu.Game/Screens/Footer/ScreenFooter.cs @@ -187,7 +187,6 @@ protected override void PopOut() public void SetButtons(IReadOnlyList buttons) { - temporarilyHiddenButtons.Clear(); overlays.Clear(); this.HidePopover(); diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs index 24d9610abc54..6408b76e4386 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs @@ -201,6 +201,7 @@ public override bool OnExiting(ScreenExitEvent e) return true; addToPlaylistFooterButton.Disappear().Expire(); + freeModSelect.Hide(); return false; } diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 26acde025d89..96091146d887 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -759,6 +759,7 @@ private void onLeavingScreen() modSelectOverlay.SelectedMods.UnbindFrom(Mods); modSelectOverlay.Ruleset.UnbindFrom(Ruleset); modSelectOverlay.Beatmap.UnbindFrom(Beatmap); + modSelectOverlay.Hide(); updateWedgeVisibility();