osu/osu.Game.Rulesets.Osu/UI/OsuSettingsSubsection.cs

52 lines
1.7 KiB
C#
Raw Normal View History

2019-01-25 10:17:48 +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
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Overlays.Settings;
2019-01-23 10:46:53 +00:00
using osu.Game.Rulesets.Osu.Configuration;
2020-10-20 04:59:03 +00:00
using osu.Game.Rulesets.UI;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Rulesets.Osu.UI
{
2019-01-23 10:46:53 +00:00
public class OsuSettingsSubsection : RulesetSettingsSubsection
2018-04-13 09:19:50 +00:00
{
protected override string Header => "osu!";
2019-01-23 10:46:53 +00:00
public OsuSettingsSubsection(Ruleset ruleset)
: base(ruleset)
{
}
2018-04-13 09:19:50 +00:00
[BackgroundDependencyLoader]
2019-01-23 10:46:53 +00:00
private void load()
2018-04-13 09:19:50 +00:00
{
var config = (OsuRulesetConfigManager)Config;
2019-01-23 10:46:53 +00:00
2018-04-13 09:19:50 +00:00
Children = new Drawable[]
{
new SettingsCheckbox
{
LabelText = "Snaking in sliders",
Current = config.GetBindable<bool>(OsuRulesetSetting.SnakingInSliders)
2018-04-13 09:19:50 +00:00
},
new SettingsCheckbox
{
LabelText = "Snaking out sliders",
Current = config.GetBindable<bool>(OsuRulesetSetting.SnakingOutSliders)
2018-04-13 09:19:50 +00:00
},
new SettingsCheckbox
{
2019-04-04 08:18:53 +00:00
LabelText = "Cursor trail",
Current = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
},
2020-10-20 04:59:03 +00:00
new SettingsEnumDropdown<PlayfieldBorderStyle>
{
2020-10-20 04:59:03 +00:00
LabelText = "Playfield border style",
Current = config.GetBindable<PlayfieldBorderStyle>(OsuRulesetSetting.PlayfieldBorderStyle),
},
2018-04-13 09:19:50 +00:00
};
}
}
}