Add a section to global keybind settings for song select

This commit is contained in:
Jack Boswell (boswelja) 2020-06-03 17:55:15 +12:00
parent 5740fc2bd0
commit 030b55ae85
2 changed files with 29 additions and 0 deletions

View File

@ -56,6 +56,13 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
};
public IEnumerable<KeyBinding> SongSelectKeyBindings => new[]
{
new KeyBinding(InputKey.F1, GlobalAction.ToggleMods),
new KeyBinding(InputKey.F2, GlobalAction.SelectRandom),
new KeyBinding(InputKey.F3, GlobalAction.ToggleOptions)
};
public IEnumerable<KeyBinding> AudioControlKeyBindings => new[]
{
new KeyBinding(new[] { InputKey.Alt, InputKey.Up }, GlobalAction.IncreaseVolume),
@ -106,6 +113,16 @@ namespace osu.Game.Input.Bindings
[Description("Toggle mute")]
ToggleMute,
// Song select keybindings
[Description("Toggle mod selection overlay")]
ToggleMods,
[Description("Select a random beatmap")]
SelectRandom,
[Description("Toggle beatmap options overlay")]
ToggleOptions,
// In-Game Keybindings
[Description("Skip cutscene")]
SkipCutscene,

View File

@ -21,6 +21,7 @@ namespace osu.Game.Overlays.KeyBinding
{
Add(new DefaultBindingsSubsection(manager));
Add(new AudioControlKeyBindingsSubsection(manager));
Add(new SongSelectKeyBindingSubsection(manager));
Add(new InGameKeyBindingsSubsection(manager));
}
@ -35,6 +36,17 @@ namespace osu.Game.Overlays.KeyBinding
}
}
private class SongSelectKeyBindingSubsection : KeyBindingsSubsection
{
protected override string Header => "Song Select";
public SongSelectKeyBindingSubsection(GlobalActionContainer manager)
: base(null)
{
Defaults = manager.SongSelectKeyBindings;
}
}
private class InGameKeyBindingsSubsection : KeyBindingsSubsection
{
protected override string Header => "In Game";