Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@ private bool FireEvent(SKTouchAction actionType, UITouch touch, bool inContact)
var cgPoint = touch.LocationInView(View);
var point = scalePixels(cgPoint.X, cgPoint.Y);

var args = new SKTouchEventArgs(id, actionType, point, inContact);
SKMouseButton mouse = SKMouseButton.Left;
SKTouchDeviceType device = touch.Type switch
{
UITouchType.IndirectPointer => SKTouchDeviceType.Mouse,
UITouchType.Indirect => SKTouchDeviceType.Mouse,
UITouchType.Stylus => SKTouchDeviceType.Pen,
UITouchType.Direct => SKTouchDeviceType.Touch,
_ => SKTouchDeviceType.Touch

};

var args = new SKTouchEventArgs(id, actionType, mouse, device, point, inContact, 0);
onTouchAction(args);
return args.Handled;
}
Expand Down