-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add iOS pen pressure #47469
Add iOS pen pressure #47469
Conversation
@HEAVYPOLY This feature is probably not cherry-pickable to |
I think commit |
a0fa3f2
to
9fd95d5
Compare
9fd95d5
to
7e9c9ee
Compare
Changes look good to me overall, but I'm still not really sure about usage of |
I think MouseEvents would be better for consistency with Desktop platforms, where pen input is treated as mouse events, even on devices with touch capability. Also on android pen is handled as mouse. |
It's handled like a mouse on other platforms. Would be nice to have separate pen events, but on desktops, it's not always possible to distinguish between mouse and pen/touch events. I agree it should use mouse events for compatibility. |
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.
I do not have Apple Pencil to test, but code seems fine.
platform/iphone/os_iphone.mm
Outdated
//ev->set_pressure(p_force); | ||
//ev->set_tilt(p_tilt); |
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.
I'd remove the commented out code. If it's meant as a reminder to implement pressure and tilt support, it should be a // TODO
or // FIXME
comment explaining what needs to be done.
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.
Ok, done!
0a62ccb
to
af44f74
Compare
af44f74
to
f60b90d
Compare
Thanks! |
This should also be forward ported to |
Adds pen pressure support for iOS Apple Pencil
@bruvzg