1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:07:52 +08:00

Fix publicly-settable bindables

This commit is contained in:
Dean Herbert 2023-10-06 16:51:24 +09:00
parent cc6210035f
commit f2e56bbb65
No known key found for this signature in database
8 changed files with 16 additions and 16 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mania.Edit
{
public partial class DrawableManiaEditorRuleset : DrawableManiaRuleset, ISupportConstantAlgorithmToggle
{
public BindableBool ShowSpeedChanges { get; set; } = new BindableBool();
public BindableBool ShowSpeedChanges { get; } = new BindableBool();
public new IScrollingInfo ScrollingInfo => base.ScrollingInfo;

View File

@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Taiko.Edit
{
public partial class DrawableTaikoEditorRuleset : DrawableTaikoRuleset, ISupportConstantAlgorithmToggle
{
public BindableBool ShowSpeedChanges { get; set; } = new BindableBool();
public BindableBool ShowSpeedChanges { get; } = new BindableBool();
public DrawableTaikoEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods)
: base(ruleset, beatmap, mods)

View File

@ -42,22 +42,22 @@ namespace osu.Game.Tests.Mods
private class ClassWithSettings
{
[SettingSource("Unordered setting", "Should be last")]
public BindableFloat UnorderedSetting { get; set; } = new BindableFloat();
public BindableFloat UnorderedSetting { get; } = new BindableFloat();
[SettingSource("Second setting", "Another description", 2)]
public BindableBool SecondSetting { get; set; } = new BindableBool();
public BindableBool SecondSetting { get; } = new BindableBool();
[SettingSource("First setting", "A description", 1)]
public BindableDouble FirstSetting { get; set; } = new BindableDouble();
public BindableDouble FirstSetting { get; } = new BindableDouble();
[SettingSource("Third setting", "Yet another description", 3)]
public BindableInt ThirdSetting { get; set; } = new BindableInt();
public BindableInt ThirdSetting { get; } = new BindableInt();
}
private class ClassWithCustomSettingControl
{
[SettingSource("Custom setting", "Should be a custom control", SettingControlType = typeof(CustomSettingsControl))]
public BindableInt UnorderedSetting { get; set; } = new BindableInt();
public BindableInt UnorderedSetting { get; } = new BindableInt();
}
private partial class CustomSettingsControl : SettingsItem<int>
@ -66,7 +66,7 @@ namespace osu.Game.Tests.Mods
private partial class CustomControl : Drawable, IHasCurrentValue<int>
{
public Bindable<int> Current { get; set; } = new Bindable<int>();
public Bindable<int> Current { get; } = new Bindable<int>();
}
}
}

View File

@ -56,7 +56,7 @@ namespace osu.Game.Tournament.Models
};
[JsonProperty]
public BindableList<TournamentUser> Players { get; set; } = new BindableList<TournamentUser>();
public BindableList<TournamentUser> Players { get; } = new BindableList<TournamentUser>();
public TournamentTeam()
{

View File

@ -47,7 +47,7 @@ namespace osu.Game.Graphics.Containers
/// <summary>
/// The amount of dim to be used when <see cref="IgnoreUserSettings"/> is <c>true</c>.
/// </summary>
public Bindable<float> DimWhenUserSettingsIgnored { get; set; } = new Bindable<float>();
public Bindable<float> DimWhenUserSettingsIgnored { get; } = new Bindable<float>();
protected Bindable<bool> LightenDuringBreaks { get; private set; } = null!;

View File

@ -22,16 +22,16 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
public bool UsesFixedAnchor { get; set; }
[SettingSource(typeof(JudgementCounterDisplayStrings), nameof(JudgementCounterDisplayStrings.JudgementDisplayMode))]
public Bindable<DisplayMode> Mode { get; set; } = new Bindable<DisplayMode>();
public Bindable<DisplayMode> Mode { get; } = new Bindable<DisplayMode>();
[SettingSource(typeof(JudgementCounterDisplayStrings), nameof(JudgementCounterDisplayStrings.FlowDirection))]
public Bindable<Direction> FlowDirection { get; set; } = new Bindable<Direction>();
public Bindable<Direction> FlowDirection { get; } = new Bindable<Direction>();
[SettingSource(typeof(JudgementCounterDisplayStrings), nameof(JudgementCounterDisplayStrings.ShowJudgementNames))]
public BindableBool ShowJudgementNames { get; set; } = new BindableBool(true);
public BindableBool ShowJudgementNames { get; } = new BindableBool(true);
[SettingSource(typeof(JudgementCounterDisplayStrings), nameof(JudgementCounterDisplayStrings.ShowMaxJudgement))]
public BindableBool ShowMaxJudgement { get; set; } = new BindableBool(true);
public BindableBool ShowMaxJudgement { get; } = new BindableBool(true);
[Resolved]
private JudgementCountController judgementCountController { get; set; } = null!;

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.HUD
{
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CornerRadius), nameof(SkinnableComponentStrings.CornerRadiusDescription),
SettingControlType = typeof(SettingsPercentageSlider<float>))]
public new BindableFloat CornerRadius { get; set; } = new BindableFloat(0.25f)
public new BindableFloat CornerRadius { get; } = new BindableFloat(0.25f)
{
MinValue = 0,
MaxValue = 0.5f,

View File

@ -30,7 +30,7 @@ namespace osu.Game.Skinning.Components
public Bindable<BeatmapAttribute> Attribute { get; } = new Bindable<BeatmapAttribute>(BeatmapAttribute.StarRating);
[SettingSource(typeof(BeatmapAttributeTextStrings), nameof(BeatmapAttributeTextStrings.Template), nameof(BeatmapAttributeTextStrings.TemplateDescription))]
public Bindable<string> Template { get; set; } = new Bindable<string>("{Label}: {Value}");
public Bindable<string> Template { get; } = new Bindable<string>("{Label}: {Value}");
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;