2018-01-05 11:21:19 +00:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-02-07 04:59:30 +00:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2017-02-07 04:52:19 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Configuration;
|
2017-04-21 11:59:04 +00:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2017-02-07 04:52:19 +00:00
|
|
|
|
|
2017-05-15 01:55:29 +00:00
|
|
|
|
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
2017-02-07 04:52:19 +00:00
|
|
|
|
{
|
2017-05-15 01:55:29 +00:00
|
|
|
|
public class SongSelectSettings : SettingsSubsection
|
2017-02-07 04:52:19 +00:00
|
|
|
|
{
|
|
|
|
|
protected override string Header => "Song Select";
|
2016-11-30 15:32:07 +00:00
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuConfigManager config)
|
|
|
|
|
{
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2017-11-24 09:34:20 +00:00
|
|
|
|
new SettingsCheckbox
|
|
|
|
|
{
|
|
|
|
|
LabelText = "Show converted beatmaps",
|
|
|
|
|
Bindable = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps),
|
|
|
|
|
},
|
2017-05-15 01:55:29 +00:00
|
|
|
|
new SettingsSlider<double, StarSlider>
|
2016-12-05 14:17:46 +00:00
|
|
|
|
{
|
|
|
|
|
LabelText = "Display beatmaps from",
|
2017-10-23 05:36:08 +00:00
|
|
|
|
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
|
|
|
|
KeyboardStep = 1f
|
2016-12-05 14:17:46 +00:00
|
|
|
|
},
|
2017-05-15 01:55:29 +00:00
|
|
|
|
new SettingsSlider<double, StarSlider>
|
2016-12-05 14:17:46 +00:00
|
|
|
|
{
|
|
|
|
|
LabelText = "up to",
|
2017-10-23 05:36:08 +00:00
|
|
|
|
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
|
|
|
|
KeyboardStep = 1f
|
2016-12-05 14:17:46 +00:00
|
|
|
|
},
|
2017-12-13 09:10:32 +00:00
|
|
|
|
new SettingsEnumDropdown<RandomSelectAlgorithm>
|
2017-05-31 16:41:15 +00:00
|
|
|
|
{
|
2017-12-13 09:10:32 +00:00
|
|
|
|
LabelText = "Random selection algorithm",
|
|
|
|
|
Bindable = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm),
|
2017-11-24 09:34:20 +00:00
|
|
|
|
}
|
2016-11-30 15:32:07 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
2017-04-21 11:59:04 +00:00
|
|
|
|
|
|
|
|
|
private class StarSlider : OsuSliderBar<double>
|
|
|
|
|
{
|
|
|
|
|
public override string TooltipText => Current.Value.ToString(@"0.## stars");
|
|
|
|
|
}
|
2017-02-07 04:52:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|