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

Refactor for legibility

This commit is contained in:
Dean Herbert 2024-05-05 23:32:24 +08:00
parent b1696db9c8
commit 9e7712740b
No known key found for this signature in database

View File

@ -23,13 +23,11 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnMouseDown(MouseDownEvent e) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (!IsActionable) // Right mouse button is a special case where we allow actioning without dismissing the menu.
return true; // This is achieved by not calling `Clicked` (as done by the base implementation in OnClick).
if (IsActionable && e.Button == MouseButton.Right)
if (e.Button != MouseButton.Right)
return true;
Item.Action.Value?.Invoke(); Item.Action.Value?.Invoke();
return true; return true;
} }