Add DimAmount for UserDimContainer

This commit is contained in:
cdwcgt
2022-10-25 13:00:53 +09:00
parent a2682b3ce3
commit f9c6190426
2 changed files with 7 additions and 1 deletions

View File

@ -48,13 +48,15 @@ namespace osu.Game.Graphics.Containers
protected Bindable<double> UserDimLevel { get; private set; }
public Bindable<float> DimAmount { get; set; } = new Bindable<float>();
protected Bindable<bool> LightenDuringBreaks { get; private set; }
protected Bindable<bool> ShowStoryboard { get; private set; }
private float breakLightening => LightenDuringBreaks.Value && IsBreakTime.Value ? BREAK_LIGHTEN_AMOUNT : 0;
protected float DimLevel => Math.Max(!IgnoreUserSettings.Value ? (float)UserDimLevel.Value - breakLightening : 0, 0);
protected float DimLevel => Math.Max(!IgnoreUserSettings.Value ? (float)UserDimLevel.Value - breakLightening : DimAmount.Value, 0);
protected override Container<Drawable> Content => dimContent;
@ -76,6 +78,7 @@ namespace osu.Game.Graphics.Containers
ShowStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
UserDimLevel.ValueChanged += _ => UpdateVisuals();
DimAmount.ValueChanged += _ => UpdateVisuals();
LightenDuringBreaks.ValueChanged += _ => UpdateVisuals();
IsBreakTime.ValueChanged += _ => UpdateVisuals();
ShowStoryboard.ValueChanged += _ => UpdateVisuals();