1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 15:17:44 +08:00
osu-lazer/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs

49 lines
1.5 KiB
C#
Raw Normal View History

// 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 13:36:19 +08:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
2018-06-11 13:36:19 +08: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 16:25:57 +08:00
private void load()
2018-06-11 13:36:19 +08:00
{
var config = (ManiaRulesetConfigManager)Config;
2018-06-11 13:36:19 +08:00
Children = new Drawable[]
{
new SettingsEnumDropdown<ManiaScrollingDirection>
{
LabelText = "Scrolling direction",
Current = config.GetBindable<ManiaScrollingDirection>(ManiaRulesetSetting.ScrollDirection)
},
new SettingsSlider<double, TimeSlider>
{
LabelText = "Scroll speed",
Current = config.GetBindable<double>(ManiaRulesetSetting.ScrollTime),
2020-09-15 14:24:01 +08:00
KeyboardStep = 5
},
2018-06-11 13:36:19 +08:00
};
}
private class TimeSlider : OsuSliderBar<double>
{
public override string TooltipText => Current.Value.ToString("N0") + "ms";
}
2018-06-11 13:36:19 +08:00
}
}