2017-08-23 11:49:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.KeyBinding
|
|
|
|
|
{
|
|
|
|
|
public class VariantBindingsSubsection : KeyBindingsSubsection
|
|
|
|
|
{
|
2017-08-23 13:19:14 +08:00
|
|
|
|
protected override string Header => variantName;
|
|
|
|
|
private readonly string variantName;
|
2017-08-23 11:49:30 +08:00
|
|
|
|
|
|
|
|
|
public VariantBindingsSubsection(RulesetInfo ruleset, int variant)
|
|
|
|
|
: base(variant)
|
|
|
|
|
{
|
|
|
|
|
Ruleset = ruleset;
|
2017-08-23 13:19:14 +08:00
|
|
|
|
|
|
|
|
|
var rulesetInstance = ruleset.CreateInstance();
|
|
|
|
|
|
|
|
|
|
variantName = rulesetInstance.GetVariantName(variant);
|
|
|
|
|
Defaults = rulesetInstance.GetDefaultKeyBindings(variant);
|
2017-08-23 11:49:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|