1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

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 @@ namespace osu.Game
return; return;
} }
if ((screenStack.CurrentScreen as IOsuScreen)?.DisallowExternalBeatmapRulesetChanges != false) if ((screenStack.CurrentScreen as IOsuScreen)?.AllowExternalScreenChange == false)
{ {
notifications.Post(new SimpleNotification notifications.Post(new SimpleNotification
{ {

View File

@ -17,6 +17,12 @@ namespace osu.Game.Screens
/// </summary> /// </summary>
bool DisallowExternalBeatmapRulesetChanges { get; } 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> /// <summary>
/// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed. /// Whether this <see cref="OsuScreen"/> allows the cursor to be displayed.
/// </summary> /// </summary>

View File

@ -17,6 +17,8 @@ namespace osu.Game.Screens.Select
public string ShortTitle => "song selection"; public string ShortTitle => "song selection";
public override string Title => ShortTitle.Humanize(); public override string Title => ShortTitle.Humanize();
public override bool AllowExternalScreenChange => false;
public MatchSongSelect() public MatchSongSelect()
{ {
Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING }; Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };