1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:02:55 +08:00

Fix drag box being incorrectly positioned for 1 frame (#6589)

Fix drag box being incorrectly positioned for 1 frame

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-10-24 23:16:54 +09:00 committed by GitHub
commit 58f19217f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -127,7 +127,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnDragStart(DragStartEvent e) protected override bool OnDragStart(DragStartEvent e)
{ {
if (!beginSelectionMovement()) if (!beginSelectionMovement())
{
dragBox.UpdateDrag(e);
dragBox.FadeIn(250, Easing.OutQuint); dragBox.FadeIn(250, Easing.OutQuint);
}
return true; return true;
} }

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
}; };
} }
public void UpdateDrag(DragEvent e) public void UpdateDrag(MouseButtonEvent e)
{ {
var dragPosition = e.ScreenSpaceMousePosition; var dragPosition = e.ScreenSpaceMousePosition;
var dragStartPosition = e.ScreenSpaceMouseDownPosition; var dragStartPosition = e.ScreenSpaceMouseDownPosition;