2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-06-11 05:36:19 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
2019-01-24 16:39:23 +00:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2018-06-11 05:36:19 +00:00
|
|
|
|
using osu.Game.Overlays.Settings;
|
|
|
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania
|
|
|
|
|
{
|
|
|
|
|
public class ManiaSettingsSubsection : RulesetSettingsSubsection
|
|
|
|
|
{
|
|
|
|
|
protected override string Header => "osu!mania";
|
|
|
|
|
|
|
|
|
|
public ManiaSettingsSubsection(ManiaRuleset ruleset)
|
|
|
|
|
: base(ruleset)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2018-07-11 08:25:57 +00:00
|
|
|
|
private void load()
|
2018-06-11 05:36:19 +00:00
|
|
|
|
{
|
2019-01-25 10:14:37 +00:00
|
|
|
|
var config = (ManiaRulesetConfigManager)Config;
|
2019-01-24 16:39:23 +00:00
|
|
|
|
|
2018-06-11 05:36:19 +00:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new SettingsEnumDropdown<ManiaScrollingDirection>
|
|
|
|
|
{
|
|
|
|
|
LabelText = "Scrolling direction",
|
2019-01-25 10:14:37 +00:00
|
|
|
|
Bindable = config.GetBindable<ManiaScrollingDirection>(ManiaRulesetSetting.ScrollDirection)
|
2019-01-24 16:39:23 +00:00
|
|
|
|
},
|
|
|
|
|
new SettingsSlider<double, TimeSlider>
|
|
|
|
|
{
|
|
|
|
|
LabelText = "Scroll speed",
|
2019-01-25 10:14:37 +00:00
|
|
|
|
Bindable = config.GetBindable<double>(ManiaRulesetSetting.ScrollTime)
|
2019-01-24 16:39:23 +00:00
|
|
|
|
},
|
2018-06-11 05:36:19 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
2019-01-24 16:39:23 +00:00
|
|
|
|
|
|
|
|
|
private class TimeSlider : OsuSliderBar<double>
|
|
|
|
|
{
|
|
|
|
|
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
|
|
|
|
}
|
2018-06-11 05:36:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|