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

Cleanup all other leftover binding instantiation

This commit is contained in:
o-dasher 2022-09-25 16:02:40 -04:00
parent 537796c3a1
commit feadac1f79
13 changed files with 11 additions and 52 deletions

View File

@ -204,31 +204,23 @@ namespace osu.Game.Tests.Online
public override double ScoreMultiplier => 1;
[SettingSource("Initial rate", "The starting speed of the track")]
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1.5)
{
MinValue = 1,
MaxValue = 2,
Default = 1.5,
Value = 1.5,
Precision = 0.01,
};
[SettingSource("Final rate", "The speed increase to ramp towards")]
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.5)
{
MinValue = 0,
MaxValue = 1,
Default = 0.5,
Value = 0.5,
Precision = 0.01,
};
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
public override BindableBool AdjustPitch { get; } = new BindableBool
{
Default = true,
Value = true
};
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
}
private class TestModDifficultyAdjust : ModDifficultyAdjust

View File

@ -124,31 +124,23 @@ namespace osu.Game.Tests.Online
public override double ScoreMultiplier => 1;
[SettingSource("Initial rate", "The starting speed of the track")]
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1.5)
{
MinValue = 1,
MaxValue = 2,
Default = 1.5,
Value = 1.5,
Precision = 0.01,
};
[SettingSource("Final rate", "The speed increase to ramp towards")]
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.5)
{
MinValue = 0,
MaxValue = 1,
Default = 0.5,
Value = 0.5,
Precision = 0.01,
};
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
public override BindableBool AdjustPitch { get; } = new BindableBool
{
Default = true,
Value = true
};
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
}
private class TestModEnum : Mod

View File

@ -29,11 +29,7 @@ namespace osu.Game.Tests.Visual.Settings
{
Child = textBox = new SettingsTextBox
{
Current = new Bindable<string>
{
Default = "test",
Value = "test"
}
Current = new Bindable<string>("test")
};
});
AddUntilStep("wait for loaded", () => textBox.IsLoaded);
@ -59,11 +55,7 @@ namespace osu.Game.Tests.Visual.Settings
{
Child = textBox = new SettingsTextBox
{
Current = new Bindable<string>
{
Default = "test",
Value = "test"
}
Current = new Bindable<string>("test")
};
});
AddUntilStep("wait for loaded", () => textBox.IsLoaded);

View File

@ -67,11 +67,7 @@ namespace osu.Game.Tests.Visual.Settings
};
[SettingSource("Sample number textbox", "Textbox number entry", SettingControlType = typeof(SettingsNumberBox))]
public Bindable<int?> IntTextBoxBindable { get; } = new Bindable<int?>
{
Default = null,
Value = null
};
public Bindable<int?> IntTextBoxBindable { get; } = new Bindable<int?>();
}
private enum TestEnum

View File

@ -38,20 +38,16 @@ namespace osu.Game.Tests.Visual.UserInterface
{
slider1 = new ExpandableSlider<float, SizeSlider<float>>
{
Current = new BindableFloat
Current = new BindableFloat(1.0f)
{
Default = 1.0f,
MinValue = 1.0f,
MaxValue = 10.0f,
Precision = 0.01f,
},
},
slider2 = new ExpandableSlider<double>
{
Current = new BindableDouble
Current = new BindableDouble(1.0)
{
Default = 1.0,
MinValue = 1.0,
MaxValue = 10.0,
Precision = 0.01,
},

View File

@ -24,7 +24,6 @@ namespace osu.Game.Beatmaps.ControlPoints
public readonly BindableDouble SliderVelocityBindable = new BindableDouble(1)
{
Precision = 0.01,
Default = 1,
MinValue = 0.1,
MaxValue = 10
};

View File

@ -28,7 +28,6 @@ namespace osu.Game.Beatmaps.ControlPoints
public readonly BindableDouble ScrollSpeedBindable = new BindableDouble(1)
{
Precision = 0.01,
Default = 1,
MinValue = 0.01,
MaxValue = 10
};

View File

@ -45,7 +45,6 @@ namespace osu.Game.Beatmaps.ControlPoints
{
MinValue = 0,
MaxValue = 100,
Default = 100
};
/// <summary>

View File

@ -49,7 +49,6 @@ namespace osu.Game.Beatmaps.ControlPoints
/// </summary>
public readonly BindableDouble BeatLengthBindable = new BindableDouble(DEFAULT_BEAT_LENGTH)
{
Default = DEFAULT_BEAT_LENGTH,
MinValue = 6,
MaxValue = 60000
};

View File

@ -60,7 +60,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
/// </summary>
protected readonly BindableDouble TimeRange = new BindableDouble(time_span_default)
{
Default = time_span_default,
MinValue = time_span_min,
MaxValue = time_span_max
};

View File

@ -34,7 +34,6 @@ namespace osu.Game.Screens.Play
public readonly BindableNumber<double> UserPlaybackRate = new BindableDouble(1)
{
Default = 1,
MinValue = 0.5,
MaxValue = 2,
Precision = 0.1,

View File

@ -31,8 +31,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
public BindableDouble Current { get; } = new BindableDouble
{
Default = 0,
Value = 0,
MinValue = -50,
MaxValue = 50,
Precision = 0.1,

View File

@ -17,7 +17,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
public readonly Bindable<double> UserPlaybackRate = new BindableDouble(1)
{
Default = 1,
MinValue = 0.5,
MaxValue = 2,
Precision = 0.1,