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;
|
2018-01-09 01:21:18 +08:00
|
|
|
using osu.Game.Input.Bindings;
|
2017-08-23 11:49:30 +08:00
|
|
|
using osu.Game.Overlays.Settings;
|
2017-08-15 23:08:59 +08:00
|
|
|
|
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 GlobalKeyBindingsSection : 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 => "Global";
|
2017-08-15 23:08:59 +08:00
|
|
|
|
2018-01-09 01:21:18 +08:00
|
|
|
public GlobalKeyBindingsSection(GlobalKeyBindingInputManager manager)
|
2017-08-23 11:49:30 +08:00
|
|
|
{
|
|
|
|
Add(new DefaultBindingsSubsection(manager));
|
2018-01-09 01:21:18 +08:00
|
|
|
Add(new InGameKeyBindingsSubsection(manager));
|
2017-08-23 11:49:30 +08:00
|
|
|
}
|
2017-08-15 23:08:59 +08:00
|
|
|
|
2018-01-09 01:21:18 +08:00
|
|
|
|
2017-08-23 11:49:30 +08:00
|
|
|
private class DefaultBindingsSubsection : KeyBindingsSubsection
|
2017-08-15 23:08:59 +08:00
|
|
|
{
|
2017-08-23 11:49:30 +08:00
|
|
|
protected override string Header => string.Empty;
|
2017-08-15 23:08:59 +08:00
|
|
|
|
2018-01-09 01:21:18 +08:00
|
|
|
public DefaultBindingsSubsection(GlobalKeyBindingInputManager manager)
|
2017-08-23 15:10:31 +08:00
|
|
|
: base(null)
|
2017-08-23 11:49:30 +08:00
|
|
|
{
|
2018-01-09 01:21:18 +08:00
|
|
|
Defaults = manager.GlobalKeyBindings;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private class InGameKeyBindingsSubsection : KeyBindingsSubsection
|
|
|
|
{
|
|
|
|
protected override string Header => "In Game";
|
|
|
|
|
|
|
|
public InGameKeyBindingsSubsection(GlobalKeyBindingInputManager manager) : base(null)
|
|
|
|
{
|
|
|
|
Defaults = manager.InGameKeyBindings;
|
2017-08-23 11:49:30 +08:00
|
|
|
}
|
2017-08-15 23:08:59 +08:00
|
|
|
}
|
|
|
|
}
|
2018-01-05 19:21:19 +08:00
|
|
|
}
|