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

When disable mouse buttons during gameplay is selected, disable more globally

Until now the disable setting would only apply to left/right buttons,
and only in gameplay. This change will cause any global actions bound to
mouse buttons to also not work during gameplay.

Closes #11879.
This commit is contained in:
Dean Herbert 2021-02-23 14:24:24 +09:00
parent 66f86bdee5
commit 672fd3f9d2

View File

@ -109,9 +109,9 @@ namespace osu.Game.Rulesets.UI
{
switch (e)
{
case MouseDownEvent mouseDown when mouseDown.Button == MouseButton.Left || mouseDown.Button == MouseButton.Right:
case MouseDownEvent _:
if (mouseDisabled.Value)
return false;
return true; // importantly, block upwards propagation so global bindings also don't fire.
break;