mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Don't handle mouse down at fixed vertices
This commit is contained in:
parent
cd447f0305
commit
d93bf5be80
@ -44,8 +44,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
int index = getMouseTargetVertex(e.ScreenSpaceMouseDownPosition);
|
||||
|
||||
if (index == -1)
|
||||
if (index == -1 || VertexStates[index].IsFixed)
|
||||
return false;
|
||||
|
||||
if (e.Button == MouseButton.Left && e.ShiftPressed)
|
||||
@ -65,7 +64,12 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
||||
|
||||
protected override bool OnDragStart(DragStartEvent e)
|
||||
{
|
||||
if (e.Button != MouseButton.Left || getMouseTargetVertex(e.ScreenSpaceMouseDownPosition) == -1) return false;
|
||||
int index = getMouseTargetVertex(e.ScreenSpaceMouseDownPosition);
|
||||
if (index == -1 || VertexStates[index].IsFixed)
|
||||
return false;
|
||||
|
||||
if (e.Button != MouseButton.Left)
|
||||
return false;
|
||||
|
||||
dragStartPosition = ToRelativePosition(e.ScreenSpaceMouseDownPosition);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user