mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 16:27:20 +08:00
Disable beatmap changes in specified screens
This commit is contained in:
parent
773ef26ce3
commit
9bbcc0526d
@ -29,7 +29,11 @@ namespace osu.Game.Screens
|
||||
|
||||
internal virtual bool HasLocalCursorDisplayed => false;
|
||||
|
||||
internal virtual bool AllowRulesetChange => true;
|
||||
/// <summary>
|
||||
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
|
||||
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
|
||||
/// </summary>
|
||||
internal virtual bool AllowBeatmapRulesetChange => true;
|
||||
|
||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
@ -85,7 +89,8 @@ namespace osu.Game.Screens
|
||||
{
|
||||
if (!IsCurrentScreen) return;
|
||||
|
||||
ruleset.Disabled = !AllowRulesetChange;
|
||||
ruleset.Disabled = !AllowBeatmapRulesetChange;
|
||||
beatmap.Disabled = !AllowBeatmapRulesetChange;
|
||||
}
|
||||
|
||||
protected override void OnResuming(Screen last)
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public Action RestartRequested;
|
||||
|
||||
internal override bool AllowRulesetChange => false;
|
||||
internal override bool AllowBeatmapRulesetChange => false;
|
||||
|
||||
public bool HasFailed { get; private set; }
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Play
|
||||
private bool showOverlays = true;
|
||||
internal override bool ShowOverlays => showOverlays;
|
||||
|
||||
internal override bool AllowRulesetChange => false;
|
||||
internal override bool AllowBeatmapRulesetChange => false;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap);
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
private ResultModeTabControl modeChangeButtons;
|
||||
|
||||
internal override bool AllowRulesetChange => false;
|
||||
internal override bool AllowBeatmapRulesetChange => false;
|
||||
|
||||
private Container currentPage;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user