Closed EmperialDev closed 1 year ago
Why is touch behind a feature? Both bevy and iced supports touch natively, so why souldn't this libary not also that? But I understand that it makes it more flexible, but then maybe just make touch a default feature, then people can turn it off, if they really don't want it.
PR seems fine, but I'm too tired to review/merge it right now. I'll get back to you tomorrow afternoon.
Why is touch behind a feature?
Honestly, I hadn't looked into iced's touch support for a long time, so I wasn't sure how stable it was. I also don't have any (non-painful) way of testing the touch support, so I wanted it to be easy for users to completely disable it should problems arise. Now, I'm not sure if it's still worth feature-gating it, so I'll look into removing that.
If you use chrome devtools you can simulate touch on the web.
This seems to work (but text rendering seems kinda screwy on wasm for me, could have something to do with https://github.com/iced-rs/iced/issues/1900). Merging, thanks for the PR!
Release published
This may fix #15, I don't have the means to test on ios, but it works for the web and windows touchscreen device. It should also fix #9, with the workaround.
I implemented the fix for #9 by @nikolajevs86, so it now works on the web.
Then I added some missing scaling for the touch input, so now the touch input works as expected.
I also changed the order of mouse input and touch input, because I notice that when you use a windows touchscreen device, the touch would register at the mouse pos, if the mouse was inside the window.