mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 20:42:55 +08:00
Update star min/max type, just use sliders for now
This commit is contained in:
parent
9db8e63f83
commit
bf33bded24
@ -13,38 +13,24 @@ namespace osu.Game.Overlays.Options.Gameplay
|
|||||||
{
|
{
|
||||||
public class SongSelectGameplayOptions : OptionsSubsection
|
public class SongSelectGameplayOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Song Select";
|
protected override string Header => "Song Select";
|
||||||
|
|
||||||
private BindableInt starMinimum, starMaximum;
|
|
||||||
private StarCounter counterMin, counterMax;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
starMinimum = (BindableInt)config.GetBindable<int>(OsuConfig.DisplayStarsMinimum);
|
|
||||||
starMaximum = (BindableInt)config.GetBindable<int>(OsuConfig.DisplayStarsMaximum);
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SliderOption<int> { LabelText = "Display beatmaps from", Bindable = starMinimum },
|
new SliderOption<double>
|
||||||
counterMin = new StarCounter { Count = starMinimum.Value },
|
{
|
||||||
new SliderOption<int> { LabelText = "up to", Bindable = starMaximum },
|
LabelText = "Display beatmaps from",
|
||||||
counterMax = new StarCounter { Count = starMaximum.Value },
|
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DisplayStarsMinimum)
|
||||||
|
},
|
||||||
|
new SliderOption<double>
|
||||||
|
{
|
||||||
|
LabelText = "up to",
|
||||||
|
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DisplayStarsMaximum)
|
||||||
|
},
|
||||||
};
|
};
|
||||||
starMinimum.ValueChanged += starValueChanged;
|
|
||||||
starMaximum.ValueChanged += starValueChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void starValueChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
counterMin.Count = starMinimum.Value;
|
|
||||||
counterMax.Count = starMaximum.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
starMinimum.ValueChanged -= starValueChanged;
|
|
||||||
starMaximum.ValueChanged -= starValueChanged;
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user