1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:13:21 +08:00

Adjust menu cursor rotation to follow mouse, rather than be fixated around original click location

This commit is contained in:
Dean Herbert 2022-06-25 19:33:44 +09:00
parent f15698d025
commit a039f9878a

View File

@ -51,6 +51,9 @@ namespace osu.Game.Graphics.Cursor
{
if (dragRotationState != DragRotationState.NotDragging)
{
if (Vector2.Distance(positionMouseDown, e.MousePosition) > 100)
positionMouseDown = Interpolation.ValueAt(0.001f, positionMouseDown, e.MousePosition, 0, Clock.ElapsedFrameTime);
var position = e.MousePosition;
float distance = Vector2Extensions.Distance(position, positionMouseDown);