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:
parent
b1696db9c8
commit
9e7712740b
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user