mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 09:23:06 +08:00
Rename field to match usage
This commit is contained in:
parent
c3eb0c6330
commit
0e502de8b4
@ -86,7 +86,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
// this test cares about checking the background belonging to the editor specifically, so check that using reference equality
|
||||
// (as `.Equals()` cannot discern between the two, as they technically share the same database GUID).
|
||||
var background = this.ChildrenOfType<BackgroundScreenBeatmap>().Single(b => ReferenceEquals(b.Beatmap.BeatmapInfo, EditorBeatmap.BeatmapInfo));
|
||||
return background.DimAmount.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
return background.DimWhenUserSettingsIgnored.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
});
|
||||
AddAssert("no mods selected", () => SelectedMods.Value.Count == 0);
|
||||
}
|
||||
@ -119,7 +119,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
// this test cares about checking the background belonging to the editor specifically, so check that using reference equality
|
||||
// (as `.Equals()` cannot discern between the two, as they technically share the same database GUID).
|
||||
var background = this.ChildrenOfType<BackgroundScreenBeatmap>().Single(b => ReferenceEquals(b.Beatmap.BeatmapInfo, EditorBeatmap.BeatmapInfo));
|
||||
return background.DimAmount.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
return background.DimWhenUserSettingsIgnored.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
});
|
||||
|
||||
AddStep("start track", () => EditorClock.Start());
|
||||
|
@ -47,9 +47,9 @@ namespace osu.Game.Graphics.Containers
|
||||
protected Bindable<double> UserDimLevel { get; private set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of dim to be override if <see cref="IgnoreUserSettings"/> is true.
|
||||
/// The amount of dim to be used when <see cref="IgnoreUserSettings"/> is <c>true</c>.
|
||||
/// </summary>
|
||||
public Bindable<float> DimAmount { get; set; } = new Bindable<float>();
|
||||
public Bindable<float> DimWhenUserSettingsIgnored { get; set; } = new Bindable<float>();
|
||||
|
||||
protected Bindable<bool> LightenDuringBreaks { get; private set; } = null!;
|
||||
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
private float breakLightening => LightenDuringBreaks.Value && IsBreakTime.Value ? BREAK_LIGHTEN_AMOUNT : 0;
|
||||
|
||||
protected float DimLevel => Math.Max(!IgnoreUserSettings.Value ? (float)UserDimLevel.Value - breakLightening : DimAmount.Value, 0);
|
||||
protected float DimLevel => Math.Max(!IgnoreUserSettings.Value ? (float)UserDimLevel.Value - breakLightening : DimWhenUserSettingsIgnored.Value, 0);
|
||||
|
||||
protected override Container<Drawable> Content => dimContent;
|
||||
|
||||
@ -79,7 +79,7 @@ namespace osu.Game.Graphics.Containers
|
||||
ShowStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
|
||||
UserDimLevel.ValueChanged += _ => UpdateVisuals();
|
||||
DimAmount.ValueChanged += _ => UpdateVisuals();
|
||||
DimWhenUserSettingsIgnored.ValueChanged += _ => UpdateVisuals();
|
||||
LightenDuringBreaks.ValueChanged += _ => UpdateVisuals();
|
||||
IsBreakTime.ValueChanged += _ => UpdateVisuals();
|
||||
ShowStoryboard.ValueChanged += _ => UpdateVisuals();
|
||||
|
@ -44,9 +44,9 @@ namespace osu.Game.Screens.Backgrounds
|
||||
public readonly Bindable<float> BlurAmount = new BindableFloat();
|
||||
|
||||
/// <summary>
|
||||
/// The amount of dim to be override if <see cref="IgnoreUserSettings"/> is true.
|
||||
/// The amount of dim to be used when <see cref="IgnoreUserSettings"/> is <c>true</c>.
|
||||
/// </summary>
|
||||
public readonly Bindable<float> DimAmount = new Bindable<float>();
|
||||
public readonly Bindable<float> DimWhenUserSettingsIgnored = new Bindable<float>();
|
||||
|
||||
internal readonly IBindable<bool> IsBreakTime = new Bindable<bool>();
|
||||
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
dimmable.IgnoreUserSettings.BindTo(IgnoreUserSettings);
|
||||
dimmable.IsBreakTime.BindTo(IsBreakTime);
|
||||
dimmable.BlurAmount.BindTo(BlurAmount);
|
||||
dimmable.DimAmount.BindTo(DimAmount);
|
||||
dimmable.DimWhenUserSettingsIgnored.BindTo(DimWhenUserSettingsIgnored);
|
||||
|
||||
StoryboardReplacesBackground.BindTo(dimmable.StoryboardReplacesBackground);
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ namespace osu.Game.Screens.Edit
|
||||
ApplyToBackground(b =>
|
||||
{
|
||||
b.IgnoreUserSettings.Value = true;
|
||||
b.DimAmount.Value = editorBackgroundDim.Value;
|
||||
b.DimWhenUserSettingsIgnored.Value = editorBackgroundDim.Value;
|
||||
b.BlurAmount.Value = 0;
|
||||
});
|
||||
}
|
||||
@ -668,7 +668,7 @@ namespace osu.Game.Screens.Edit
|
||||
ApplyToBackground(b =>
|
||||
{
|
||||
//b.DimAmount.UnbindAll();
|
||||
b.DimAmount.Value = 0;
|
||||
b.DimWhenUserSettingsIgnored.Value = 0;
|
||||
});
|
||||
resetTrack();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user