-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve triggering of touch event and introduce Eraser device #1293
base: release/2.x
Are you sure you want to change the base?
Conversation
Thanks for this PR. Sorry it took so long to get to it. |
Should I close this PR? After 2 years I think that it will not be merged anymore |
Is this still planned? It would fix #1814 and the Eraser addition is also quite needed. Being able to detect pen pressure on Windows is essential, and it is a one-line fix. If this pull request is not getting further attention, I can make a new one that will fix at least the pressure issue. |
/rebase |
|
||
var wheelDelta = pointerPoint?.Properties?.MouseWheelDelta ?? 0; | ||
var pressure = pointerPoint?.Properties?.Pressure ?? 0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 133 should be ?? 1
because 1 is the default pressure for SKTouchEventArgs
. Also this change would fix the compiler error.
pr1239fix.patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in my comment above, the attached one-line patch is required to fix the build and ensure that pressure handling is consistent across platforms and devices (i.e. use a default value of 1).
pr1239fix.patch
Description of Changes
API Changes
Added:
Eraser
member forSKTouchDeviceType
enum..ctor(long, SKTouchAction, SKPoint, bool, float)
forSKTouchEventArgs
class.Behavioral Changes
Pressed
,Up
andCancel
events for all pointers instead of triggering just forMoved
event.PR Checklist