private void OnPointerMoved(PointerEvent ev) { guiCurveEditor.OnPointerMoved(ev); if (isButtonHeld) { Vector2I windowPos = ScreenToWindowPos(ev.ScreenPos); int distance = Vector2I.Distance(dragStartPos, windowPos); if (distance >= DRAG_START_DISTANCE) { isDragInProgress = true; Cursor.Hide(); Rect2I clipRect; clipRect.x = ev.ScreenPos.x - 2; clipRect.y = ev.ScreenPos.y - 2; clipRect.width = 4; clipRect.height = 4; Cursor.ClipToRect(clipRect); } } }
/// <summary> /// Triggered when the user moves the mouse. /// </summary> /// <param name="ev">Information about the mouse move event.</param> private void OnPointerMoved(PointerEvent ev) { curveEditor.OnPointerMoved(ev); }