Add editor key bindings to switch between screens

This commit is contained in:
Dean Herbert
2020-09-22 15:55:25 +09:00
parent e52a330dd8
commit 3062fe4411
3 changed files with 62 additions and 11 deletions

View File

@ -21,7 +21,7 @@ namespace osu.Game.Input.Bindings
handler = game;
}
public override IEnumerable<KeyBinding> DefaultKeyBindings => GlobalKeyBindings.Concat(InGameKeyBindings).Concat(AudioControlKeyBindings);
public override IEnumerable<KeyBinding> DefaultKeyBindings => GlobalKeyBindings.Concat(InGameKeyBindings).Concat(AudioControlKeyBindings).Concat(EditorKeyBindings);
public IEnumerable<KeyBinding> GlobalKeyBindings => new[]
{
@ -50,6 +50,14 @@ namespace osu.Game.Input.Bindings
new KeyBinding(InputKey.KeypadEnter, GlobalAction.Select),
};
public IEnumerable<KeyBinding> EditorKeyBindings => new[]
{
new KeyBinding(new[] { InputKey.F1 }, GlobalAction.EditorComposeMode),
new KeyBinding(new[] { InputKey.F2 }, GlobalAction.EditorDesignMode),
new KeyBinding(new[] { InputKey.F3 }, GlobalAction.EditorTimingMode),
new KeyBinding(new[] { InputKey.F4 }, GlobalAction.EditorSetupMode),
};
public IEnumerable<KeyBinding> InGameKeyBindings => new[]
{
new KeyBinding(InputKey.Space, GlobalAction.SkipCutscene),
@ -68,7 +76,7 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.Alt, InputKey.Down }, GlobalAction.DecreaseVolume),
new KeyBinding(new[] { InputKey.Alt, InputKey.MouseWheelDown }, GlobalAction.DecreaseVolume),
new KeyBinding(InputKey.F4, GlobalAction.ToggleMute),
new KeyBinding(InputKey.Mute, GlobalAction.ToggleMute),
new KeyBinding(InputKey.TrackPrevious, GlobalAction.MusicPrev),
new KeyBinding(InputKey.F1, GlobalAction.MusicPrev),
@ -139,7 +147,7 @@ namespace osu.Game.Input.Bindings
[Description("Quick exit (Hold)")]
QuickExit,
// Game-wide beatmap msi ccotolle keybindings
// Game-wide beatmap music controller keybindings
[Description("Next track")]
MusicNext,
@ -166,5 +174,18 @@ namespace osu.Game.Input.Bindings
[Description("Pause")]
PauseGameplay,
// Editor
[Description("Setup Mode")]
EditorSetupMode,
[Description("Compose Mode")]
EditorComposeMode,
[Description("Design Mode")]
EditorDesignMode,
[Description("Timing Mode")]
EditorTimingMode,
}
}