// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Input.States; using osuTK; namespace osu.Framework.Input.Events { /// /// Represents a touch motion event. /// public class TouchMoveEvent : TouchEvent { /// /// The last touch position in the screen space. /// public readonly Vector2 ScreenSpaceLastTouchPosition; /// /// The last touch position in local space. /// public Vector2 LastTouchPosition => ToLocalSpace(ScreenSpaceLastTouchPosition); /// /// The difference of touch position from last position to current position in local space. /// public Vector2 Delta => Touch.Position - LastTouchPosition; public TouchMoveEvent(InputState state, Touch touch, Vector2? screenSpaceTouchDownPosition, Vector2 screenSpaceLastTouchPosition) : base(state, touch, screenSpaceTouchDownPosition) { ScreenSpaceLastTouchPosition = screenSpaceLastTouchPosition; } } }