Ejemplo n.º 1
0
        private void OnTouch(object sender, SKTouchEventArgs e)
        {
            TouchAction touchAction = TouchAction.None;

            switch (e.ActionType)
            {
            case SKTouchAction.Pressed:
                touchAction = TouchAction.Pressed;
                break;

            case SKTouchAction.Released:
                touchAction = TouchAction.Released;
                break;

            case SKTouchAction.Moved:
                touchAction = TouchAction.Moved;
                break;
            }

            _client.OnTouch(CanvasView.CanvasSize, e.Id, e.Location, touchAction);

            e.Handled = true;
        }
Ejemplo n.º 2
0
 private void OnTouch(MouseEventArgs e, TouchAction touchAction)
 {
     _client.OnTouch(SkElement.CanvasSize, _touchId.Value, e.GetPosition(SkElement).ToSKPoint(), touchAction);
 }