Revert "Inverse ignore user settings bindable to "apply user settings" instead"

This reverts commit 175b8da2b2.
This commit is contained in:
Salman Ahmed
2021-04-15 08:02:12 +03:00
parent 175b8da2b2
commit 92fd34cea9
9 changed files with 32 additions and 29 deletions

View File

@ -27,9 +27,9 @@ namespace osu.Game.Screens.Backgrounds
private WorkingBeatmap beatmap;
/// <summary>
/// Whether or not user-configured effect settings should be applied to this background screen.
/// Whether or not user-configured settings relating to brightness of elements should be ignored
/// </summary>
public readonly Bindable<bool> ApplyUserSettings = new Bindable<bool>();
public readonly Bindable<bool> IgnoreUserSettings = new Bindable<bool>();
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
@ -50,7 +50,10 @@ namespace osu.Game.Screens.Backgrounds
InternalChild = dimmable = CreateFadeContainer();
dimmable.ApplyUserSettings.BindTo(ApplyUserSettings);
// Beatmap background screens should not apply user settings by default.
IgnoreUserSettings.Value = true;
dimmable.IgnoreUserSettings.BindTo(IgnoreUserSettings);
dimmable.IsBreakTime.BindTo(IsBreakTime);
dimmable.BlurAmount.BindTo(BlurAmount);
@ -148,7 +151,7 @@ namespace osu.Game.Screens.Backgrounds
/// <summary>
/// As an optimisation, we add the two blur portions to be applied rather than actually applying two separate blurs.
/// </summary>
private Vector2 blurTarget => ApplyUserSettings.Value
private Vector2 blurTarget => !IgnoreUserSettings.Value
? new Vector2(BlurAmount.Value + (float)userBlurLevel.Value * USER_BLUR_FACTOR)
: new Vector2(BlurAmount.Value);
@ -167,8 +170,8 @@ namespace osu.Game.Screens.Backgrounds
}
protected override bool ShowDimContent
// The background needs to be hidden in the case of it being replaced by the storyboard.
=> (ApplyUserSettings.Value && !ShowStoryboard.Value) || !StoryboardReplacesBackground.Value;
// The background needs to be hidden in the case of it being replaced by the storyboard
=> (!ShowStoryboard.Value && !IgnoreUserSettings.Value) || !StoryboardReplacesBackground.Value;
protected override void UpdateVisuals()
{