2021-08-22 23:40:11 +08: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.
2022-06-17 15:37:17 +08:00
#nullable disable
2021-08-22 23:40:11 +08:00
using osu.Framework.Allocation ;
using osu.Framework.Graphics ;
using osu.Game.Graphics.UserInterfaceV2 ;
using osu.Game.Screens.Edit.Setup ;
namespace osu.Game.Rulesets.Mania.Edit.Setup
{
2022-11-24 13:32:20 +08:00
public partial class ManiaSetupSection : RulesetSetupSection
2021-08-22 23:40:11 +08:00
{
private LabelledSwitchButton specialStyle ;
public ManiaSetupSection ( )
: base ( new ManiaRuleset ( ) . RulesetInfo )
{
}
[BackgroundDependencyLoader]
private void load ( )
{
Children = new Drawable [ ]
{
specialStyle = new LabelledSwitchButton
{
Label = "Use special (N+1) style" ,
2023-05-09 13:03:13 +08:00
Description = "Changes one column to act as a classic \"scratch\" or \"special\" column, which can be moved around by the user's skin (to the left/right/centre). Generally used in 6K (5+1) or 8K (7+1) configurations." ,
2021-08-22 23:40:11 +08:00
Current = { Value = Beatmap . BeatmapInfo . SpecialStyle }
}
} ;
}
protected override void LoadComplete ( )
{
base . LoadComplete ( ) ;
specialStyle . Current . BindValueChanged ( _ = > updateBeatmap ( ) ) ;
}
private void updateBeatmap ( )
{
Beatmap . BeatmapInfo . SpecialStyle = specialStyle . Current . Value ;
2022-08-16 15:31:56 +08:00
Beatmap . SaveState ( ) ;
2021-08-22 23:40:11 +08:00
}
}
}