Fix regression in screen change allowance logic

This commit is contained in:
Dean Herbert 2019-02-13 19:43:01 +09:00
parent 3ec94e4ab3
commit e604806398
3 changed files with 9 additions and 1 deletions

View File

@ -292,7 +292,7 @@ protected void LoadScore(ScoreInfo score, bool silent)
return;
}
if ((screenStack.CurrentScreen as IOsuScreen)?.DisallowExternalBeatmapRulesetChanges != false)
if ((screenStack.CurrentScreen as IOsuScreen)?.AllowExternalScreenChange == false)
{
notifications.Post(new SimpleNotification
{

View File

@ -17,6 +17,12 @@ public interface IOsuScreen : IScreen
/// </summary>
bool DisallowExternalBeatmapRulesetChanges { get; }
/// <summary>
/// Whether a top-level component should be allowed to exit the current screen to, for example,
/// complete an import.
/// </summary>
bool AllowExternalScreenChange { get; }
/// <summary>
/// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed.
/// </summary>

View File

@ -17,6 +17,8 @@ public class MatchSongSelect : SongSelect, IMultiplayerSubScreen
public string ShortTitle => "song selection";
public override string Title => ShortTitle.Humanize();
public override bool AllowExternalScreenChange => false;
public MatchSongSelect()
{
Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };