osu/osu.Game/Overlays/KeyBinding/VariantBindingsSubsection.cs

24 lines
701 B
C#
Raw Normal View History

// 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.Game.Rulesets;
namespace osu.Game.Overlays.KeyBinding
{
public class VariantBindingsSubsection : KeyBindingsSubsection
{
2019-11-12 09:45:42 +00:00
protected override string Header { get; }
2018-04-13 09:19:50 +00:00
public VariantBindingsSubsection(RulesetInfo ruleset, int variant)
: base(variant)
{
Ruleset = ruleset;
var rulesetInstance = ruleset.CreateInstance();
2019-11-12 09:45:42 +00:00
Header = rulesetInstance.GetVariantName(variant);
2018-04-13 09:19:50 +00:00
Defaults = rulesetInstance.GetDefaultKeyBindings(variant);
}
}
}