1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Move replay specific key bindings to their own section

This commit is contained in:
Dean Herbert 2023-02-02 15:25:45 +09:00
parent edecd2ee25
commit 659b78058f
3 changed files with 24 additions and 2 deletions

View File

@ -35,6 +35,7 @@ namespace osu.Game.Input.Bindings
// It is used to decide the order of precedence, with the earlier items having higher precedence.
public override IEnumerable<IKeyBinding> DefaultKeyBindings => GlobalKeyBindings
.Concat(EditorKeyBindings)
.Concat(ReplayKeyBindings)
.Concat(InGameKeyBindings)
.Concat(SongSelectKeyBindings)
.Concat(AudioControlKeyBindings)
@ -112,12 +113,16 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.F4 }, GlobalAction.IncreaseScrollSpeed),
new KeyBinding(new[] { InputKey.Shift, InputKey.Tab }, GlobalAction.ToggleInGameInterface),
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD),
new KeyBinding(InputKey.Tab, GlobalAction.ToggleChatFocus),
};
public IEnumerable<KeyBinding> ReplayKeyBindings => new[]
{
new KeyBinding(InputKey.Space, GlobalAction.TogglePauseReplay),
new KeyBinding(InputKey.MouseMiddle, GlobalAction.TogglePauseReplay),
new KeyBinding(InputKey.Left, GlobalAction.SeekReplayBackward),
new KeyBinding(InputKey.Right, GlobalAction.SeekReplayForward),
new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD),
new KeyBinding(InputKey.Tab, GlobalAction.ToggleChatFocus),
};
public IEnumerable<KeyBinding> SongSelectKeyBindings => new[]

View File

@ -34,6 +34,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString InGameSection => new TranslatableString(getKey(@"in_game_section"), @"In Game");
/// <summary>
/// "Replay"
/// </summary>
public static LocalisableString ReplaySection => new TranslatableString(getKey(@"replay_section"), @"Replay");
/// <summary>
/// "Audio"
/// </summary>

View File

@ -25,6 +25,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
Add(new AudioControlKeyBindingsSubsection(manager));
Add(new SongSelectKeyBindingSubsection(manager));
Add(new InGameKeyBindingsSubsection(manager));
Add(new ReplayKeyBindingsSubsection(manager));
Add(new EditorKeyBindingsSubsection(manager));
}
@ -72,6 +73,17 @@ namespace osu.Game.Overlays.Settings.Sections.Input
}
}
private partial class ReplayKeyBindingsSubsection : KeyBindingsSubsection
{
protected override LocalisableString Header => InputSettingsStrings.ReplaySection;
public ReplayKeyBindingsSubsection(GlobalActionContainer manager)
: base(null)
{
Defaults = manager.ReplayKeyBindings;
}
}
private partial class AudioControlKeyBindingsSubsection : KeyBindingsSubsection
{
protected override LocalisableString Header => InputSettingsStrings.AudioSection;