mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Make KeyBindingOverlay support variants as settings sub sections.
This commit is contained in:
@ -2,20 +2,26 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Overlays.KeyBinding
|
||||
{
|
||||
public class RulesetBindingsSection : KeyBindingsSection
|
||||
public class RulesetBindingsSection : SettingsSection
|
||||
{
|
||||
public override FontAwesome Icon => FontAwesome.fa_osu_mod_nofail;
|
||||
public override string Header => Ruleset.Name;
|
||||
public override FontAwesome Icon => FontAwesome.fa_osu_hot;
|
||||
public override string Header => ruleset.Name;
|
||||
|
||||
private readonly RulesetInfo ruleset;
|
||||
|
||||
public RulesetBindingsSection(RulesetInfo ruleset)
|
||||
{
|
||||
Ruleset = ruleset;
|
||||
this.ruleset = ruleset;
|
||||
|
||||
Defaults = ruleset.CreateInstance().GetDefaultKeyBindings();
|
||||
var r = ruleset.CreateInstance();
|
||||
|
||||
foreach (var variant in r.AvailableVariants)
|
||||
Add(new VariantBindingsSubsection(ruleset, variant));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user