mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Merge pull request #9540 from peppy/gameplay-pause-via-middle-mouse
Allow pausing gameplay via middle mouse button
This commit is contained in:
commit
c49ce65326
@ -57,6 +57,7 @@ namespace osu.Game.Input.Bindings
|
|||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
|
||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
|
||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
|
||||||
|
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
|
||||||
};
|
};
|
||||||
|
|
||||||
public IEnumerable<KeyBinding> AudioControlKeyBindings => new[]
|
public IEnumerable<KeyBinding> AudioControlKeyBindings => new[]
|
||||||
@ -160,6 +161,9 @@ namespace osu.Game.Input.Bindings
|
|||||||
Home,
|
Home,
|
||||||
|
|
||||||
[Description("Toggle notifications")]
|
[Description("Toggle notifications")]
|
||||||
ToggleNotifications
|
ToggleNotifications,
|
||||||
|
|
||||||
|
[Description("Pause")]
|
||||||
|
PauseGameplay,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,6 +251,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
|
case GlobalAction.PauseGameplay: // in the future this behaviour will differ for replays etc.
|
||||||
if (!pendingAnimation)
|
if (!pendingAnimation)
|
||||||
BeginConfirm();
|
BeginConfirm();
|
||||||
return true;
|
return true;
|
||||||
@ -264,6 +265,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
|
case GlobalAction.PauseGameplay:
|
||||||
AbortConfirm();
|
AbortConfirm();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user