1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Allow pausing gameplay via middle mouse button

This commit is contained in:
Dean Herbert 2020-07-12 23:03:03 +09:00
parent 57cfdb82ce
commit 08696b9bca
2 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,7 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
};
public IEnumerable<KeyBinding> AudioControlKeyBindings => new[]
@ -157,5 +158,8 @@ namespace osu.Game.Input.Bindings
[Description("Home")]
Home,
[Description("Pause")]
PauseGameplay,
}
}

View File

@ -251,6 +251,7 @@ namespace osu.Game.Screens.Play.HUD
switch (action)
{
case GlobalAction.Back:
case GlobalAction.PauseGameplay:
if (!pendingAnimation)
BeginConfirm();
return true;