Ejemplo n.º 1
0
 protected override void UIControlOnPointerMoved(CoreWindow o, PointerEventArgs args)
 {
     if (isPositionLocked)
     {
         var position = args.CurrentPoint.Position;
         position.X += UIControl.Bounds.Left;
         position.Y += UIControl.Bounds.Top;
         mouseState.HandleMouseDelta(new Vector2(
                                         (float)position.X - (float)capturedPosition.X,
                                         (float)position.Y - (float)capturedPosition.Y));
         UIControl.PointerPosition = capturedPosition;
     }
     else
     {
         mouseState.HandlePointerMoved(args.CurrentPoint);
     }
 }
Ejemplo n.º 2
0
 private void OnRelativeMouseMoved(MouseDevice sender, MouseEventArgs args)
 {
     mouseState.HandleMouseDelta(new Vector2((float)args.MouseDelta.X, (float)args.MouseDelta.Y));
 }