1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:47:24 +08:00

Rename control class to be more descriptive

This commit is contained in:
Dean Herbert 2021-07-08 20:37:38 +09:00
parent ba939c0b65
commit b7803b889e

View File

@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Mods
/// </summary> /// </summary>
private readonly BindableNumber<float> displayNumber = new BindableNumber<float>(); private readonly BindableNumber<float> displayNumber = new BindableNumber<float>();
protected override Drawable CreateControl() => new ControlDrawable(displayNumber); protected override Drawable CreateControl() => new SliderControl(displayNumber);
private bool isInternalChange; private bool isInternalChange;
@ -81,19 +81,20 @@ namespace osu.Game.Rulesets.Mods
} }
} }
private class ControlDrawable : CompositeDrawable, IHasCurrentValue<float?> private class SliderControl : CompositeDrawable, IHasCurrentValue<float?>
{ {
private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>(); private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>();
// Mainly just for fulfilling the interface requirements. // Mainly just for fulfilling the interface requirements.
// The actual update flow is done via the provided number. // The actual update flow is done via the provided number.
// Of note, this is used for the "reset to default" flow.
public Bindable<float?> Current public Bindable<float?> Current
{ {
get => current.Current; get => current.Current;
set => current.Current = value; set => current.Current = value;
} }
public ControlDrawable(BindableNumber<float> currentNumber) public SliderControl(BindableNumber<float> currentNumber)
{ {
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {