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-04-13 09:19:50 +00:00
|
|
|
|
|
2020-04-03 09:25:01 +00:00
|
|
|
|
using System;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Configuration.Tracking;
|
|
|
|
|
using osu.Game.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Configuration;
|
2018-06-11 05:36:19 +00:00
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Configuration
|
|
|
|
|
{
|
2019-01-25 10:14:37 +00:00
|
|
|
|
public class ManiaRulesetConfigManager : RulesetConfigManager<ManiaRulesetSetting>
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-01-25 10:14:37 +00:00
|
|
|
|
public ManiaRulesetConfigManager(SettingsStore settings, RulesetInfo ruleset, int? variant = null)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
: base(settings, ruleset, variant)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void InitialiseDefaults()
|
|
|
|
|
{
|
|
|
|
|
base.InitialiseDefaults();
|
|
|
|
|
|
2021-03-17 07:10:16 +00:00
|
|
|
|
SetDefault(ManiaRulesetSetting.ScrollTime, 1500.0, DrawableManiaRuleset.MIN_TIME_RANGE, DrawableManiaRuleset.MAX_TIME_RANGE, 5);
|
|
|
|
|
SetDefault(ManiaRulesetSetting.ScrollDirection, ManiaScrollingDirection.Down);
|
2021-04-26 11:05:12 +00:00
|
|
|
|
SetDefault(ManiaRulesetSetting.TimingBasedNoteColouring, false);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
|
|
|
|
{
|
2020-04-03 09:38:04 +00:00
|
|
|
|
new TrackedSetting<double>(ManiaRulesetSetting.ScrollTime,
|
|
|
|
|
v => new SettingDescription(v, "Scroll Speed", $"{(int)Math.Round(DrawableManiaRuleset.MAX_TIME_RANGE / v)} ({v}ms)"))
|
2018-04-13 09:19:50 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-25 10:14:37 +00:00
|
|
|
|
public enum ManiaRulesetSetting
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2018-06-11 05:36:19 +00:00
|
|
|
|
ScrollTime,
|
2021-04-24 08:23:52 +00:00
|
|
|
|
ScrollDirection,
|
2021-04-26 11:05:12 +00:00
|
|
|
|
TimingBasedNoteColouring
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|