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;
|
2021-06-25 17:10:04 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
2019-01-24 16:39:23 +00:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2023-01-15 20:30:11 +00:00
|
|
|
|
using osu.Game.Localisation;
|
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 partial class ManiaSettingsSubsection : RulesetSettingsSubsection
|
|
|
|
|
{
|
2021-07-15 03:50:34 +00:00
|
|
|
|
protected override LocalisableString Header => "osu!mania";
|
2018-06-11 05:36:19 +00:00
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
{
|
2023-01-15 20:30:11 +00:00
|
|
|
|
LabelText = RulesetSettingsStrings.ScrollingDirection,
|
2020-10-06 08:18:41 +00:00
|
|
|
|
Current = config.GetBindable<ManiaScrollingDirection>(ManiaRulesetSetting.ScrollDirection)
|
2019-01-24 16:39:23 +00:00
|
|
|
|
},
|
2023-05-29 12:14:03 +00:00
|
|
|
|
new SettingsSlider<int, ManiaScrollSlider>
|
2019-01-24 16:39:23 +00:00
|
|
|
|
{
|
2023-01-15 20:30:11 +00:00
|
|
|
|
LabelText = RulesetSettingsStrings.ScrollSpeed,
|
2023-05-29 12:14:03 +00:00
|
|
|
|
Current = config.GetBindable<int>(ManiaRulesetSetting.ScrollSpeed),
|
2020-09-15 06:24:01 +00:00
|
|
|
|
KeyboardStep = 5
|
2019-01-24 16:39:23 +00:00
|
|
|
|
},
|
2021-04-24 12:39:22 +00:00
|
|
|
|
new SettingsCheckbox
|
2021-04-24 08:23:52 +00:00
|
|
|
|
{
|
2023-01-15 20:30:11 +00:00
|
|
|
|
LabelText = RulesetSettingsStrings.TimingBasedColouring,
|
2021-04-26 11:05:12 +00:00
|
|
|
|
Current = config.GetBindable<bool>(ManiaRulesetSetting.TimingBasedNoteColouring),
|
2021-04-24 08:23:52 +00:00
|
|
|
|
}
|
2018-06-11 05:36:19 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
2022-09-08 08:59:48 +00:00
|
|
|
|
|
2023-05-29 12:14:03 +00:00
|
|
|
|
private partial class ManiaScrollSlider : RoundedSliderBar<int>
|
2022-09-08 08:59:48 +00:00
|
|
|
|
{
|
2023-06-06 12:40:09 +00:00
|
|
|
|
public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip((int)DrawableManiaRuleset.ComputeScrollTime(Current.Value), Current.Value);
|
2022-09-08 08:59:48 +00:00
|
|
|
|
}
|
2018-06-11 05:36:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|