mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Make IOsuScreen.AllowTrackAdjustments nullable
Allows for inheriting value from the previous screen if undefined
This commit is contained in:
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
protected bool HasUnsavedChanges => lastSavedHash != changeHandler.CurrentStateHash;
|
||||
|
||||
|
@ -60,8 +60,9 @@ namespace osu.Game.Screens
|
||||
|
||||
/// <summary>
|
||||
/// Whether mod track adjustments are allowed to be applied.
|
||||
/// Null means to inherit from the parent screen.
|
||||
/// </summary>
|
||||
bool AllowTrackAdjustments { get; }
|
||||
bool? AllowTrackAdjustments { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the back button has been pressed to close any overlays before exiting this <see cref="IOsuScreen"/>.
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Import
|
||||
{
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
private OsuFileSelector fileSelector;
|
||||
private Container contentContainer;
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
public override bool AllowExternalScreenChange => true;
|
||||
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
private Screen songSelect;
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
// We are managing our own adjustments. For now, this happens inside the Player instances themselves.
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether all spectating players have finished loading.
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
[Cached]
|
||||
protected readonly OverlayColourProvider ColourProvider = new OverlayColourProvider(OverlayColourScheme.Plum);
|
||||
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
public override bool CursorVisible => (screenStack?.CurrentScreen as IOnlinePlaySubScreen)?.CursorVisible ?? true;
|
||||
|
||||
|
@ -11,6 +11,8 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => false;
|
||||
|
||||
public override bool? AllowTrackAdjustments => true;
|
||||
|
||||
public virtual string ShortTitle => Title;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Screens
|
||||
|
||||
public virtual float BackgroundParallaxAmount => 1;
|
||||
|
||||
public virtual bool AllowTrackAdjustments => true;
|
||||
public virtual bool? AllowTrackAdjustments => null;
|
||||
|
||||
public Bindable<WorkingBeatmap> Beatmap { get; private set; }
|
||||
|
||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Play
|
||||
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.UserTriggered;
|
||||
|
||||
// We are managing our own adjustments (see OnEntering/OnExiting).
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
private readonly IBindable<bool> gameActive = new Bindable<bool>(true);
|
||||
|
||||
|
@ -10,6 +10,8 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
|
||||
|
||||
public override bool? AllowTrackAdjustments => true;
|
||||
|
||||
public void ApplyToBackground(Action<BackgroundScreenBeatmap> action) => base.ApplyToBackground(b => action.Invoke((BackgroundScreenBeatmap)b));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Screens
|
||||
|
||||
public override bool CursorVisible => false;
|
||||
|
||||
public override bool AllowTrackAdjustments => false;
|
||||
public override bool? AllowTrackAdjustments => false;
|
||||
|
||||
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
||||
}
|
||||
|
Reference in New Issue
Block a user