1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Check sub screen's OnBackButton instead

This commit is contained in:
Joehu 2020-07-14 13:19:48 -07:00
parent 21ed9df1ea
commit 73e1bf0d89
2 changed files with 4 additions and 9 deletions

View File

@ -20,9 +20,9 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Multi.Components;
using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Match;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Screens.Select;
using osuTK;
namespace osu.Game.Screens.Multi
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Multi
private readonly Bindable<Room> selectedRoom = new Bindable<Room>();
[Cached]
private readonly Bindable<Lounge.Components.FilterCriteria> currentFilter = new Bindable<Lounge.Components.FilterCriteria>(new Lounge.Components.FilterCriteria());
private readonly Bindable<FilterCriteria> currentFilter = new Bindable<FilterCriteria>(new FilterCriteria());
[Cached(Type = typeof(IRoomManager))]
private RoomManager roomManager;
@ -265,13 +265,8 @@ namespace osu.Game.Screens.Multi
public override bool OnBackButton()
{
var songSelect = screenStack.CurrentScreen as MatchSongSelect;
if (songSelect?.ModSelect.State.Value == Visibility.Visible)
{
songSelect.ModSelect.Hide();
if ((screenStack.CurrentScreen as IMultiplayerSubScreen).OnBackButton())
return true;
}
if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen))
{

View File

@ -86,7 +86,7 @@ namespace osu.Game.Screens.Select
[Resolved]
private BeatmapManager beatmaps { get; set; }
public ModSelectOverlay ModSelect { get; private set; }
protected ModSelectOverlay ModSelect { get; private set; }
protected SampleChannel SampleConfirm { get; private set; }