mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Disable beatmap changes in specified screens
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user