2018-01-05 19:21:19 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-08-15 23:08:59 +08:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Game.Graphics;
|
2017-08-23 11:49:30 +08:00
|
|
|
using osu.Game.Overlays.Settings;
|
2017-08-15 23:08:59 +08:00
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
2017-08-16 16:19:27 +08:00
|
|
|
namespace osu.Game.Overlays.KeyBinding
|
2017-08-15 23:08:59 +08:00
|
|
|
{
|
2017-08-23 11:49:30 +08:00
|
|
|
public class RulesetBindingsSection : SettingsSection
|
2017-08-15 23:08:59 +08:00
|
|
|
{
|
2017-08-23 11:49:30 +08:00
|
|
|
public override FontAwesome Icon => FontAwesome.fa_osu_hot;
|
|
|
|
public override string Header => ruleset.Name;
|
|
|
|
|
|
|
|
private readonly RulesetInfo ruleset;
|
2017-08-15 23:08:59 +08:00
|
|
|
|
|
|
|
public RulesetBindingsSection(RulesetInfo ruleset)
|
|
|
|
{
|
2017-08-23 11:49:30 +08:00
|
|
|
this.ruleset = ruleset;
|
|
|
|
|
|
|
|
var r = ruleset.CreateInstance();
|
2017-08-15 23:08:59 +08:00
|
|
|
|
2017-08-23 11:49:30 +08:00
|
|
|
foreach (var variant in r.AvailableVariants)
|
|
|
|
Add(new VariantBindingsSubsection(ruleset, variant));
|
2017-08-15 23:08:59 +08:00
|
|
|
}
|
|
|
|
}
|
2018-01-05 19:21:19 +08:00
|
|
|
}
|