2018-01-05 11:21:19 +00:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-08-15 15:08:59 +00:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Input.Bindings;
|
2017-08-16 08:19:27 +00:00
|
|
|
using osu.Game.Overlays.KeyBinding;
|
2017-08-15 15:08:59 +00:00
|
|
|
using osu.Game.Overlays.Settings;
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
2017-08-16 08:19:27 +00:00
|
|
|
namespace osu.Game.Overlays
|
2017-08-15 15:08:59 +00:00
|
|
|
{
|
2017-08-16 08:43:01 +00:00
|
|
|
public class KeyBindingOverlay : SettingsOverlay
|
2017-08-15 15:08:59 +00:00
|
|
|
{
|
|
|
|
protected override Drawable CreateHeader() => new SettingsHeader("key configuration", "Customise your keys!");
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader(permitNulls: true)]
|
2017-08-16 08:34:49 +00:00
|
|
|
private void load(RulesetStore rulesets, GlobalKeyBindingInputManager global)
|
2017-08-15 15:08:59 +00:00
|
|
|
{
|
2017-08-23 03:49:30 +00:00
|
|
|
AddSection(new GlobalKeyBindingsSection(global));
|
2017-08-15 15:08:59 +00:00
|
|
|
|
2017-10-16 08:02:31 +00:00
|
|
|
foreach (var ruleset in rulesets.AvailableRulesets)
|
2017-08-15 15:08:59 +00:00
|
|
|
AddSection(new RulesetBindingsSection(ruleset));
|
|
|
|
}
|
|
|
|
|
2017-08-16 08:43:01 +00:00
|
|
|
public KeyBindingOverlay()
|
2017-08-15 15:08:59 +00:00
|
|
|
: base(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
2018-01-05 11:21:19 +00:00
|
|
|
}
|