mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
c4fc5d88f0
# Objective `bevy_ui` doesn't support correctly touch inputs because of two problems in the focus system: - It attempts to retrieve touch input with a specific `0` id - It doesn't retrieve touch positions and bases its focus solely on mouse position, absent from mobile devices ## Solution I added a few methods to the `Touches` resource, allowing to check if **any** touch input was pressed, released or cancelled and to retrieve the *position* of the first pressed touch input and adapted the focus system. I added a test button to the *iOS* example and it works correclty on emulator. I did not test on a real touch device as: - Android is not working (https://github.com/bevyengine/bevy/issues/3249) - I don't have an iOS device |
||
---|---|---|
.. | ||
bevy_ios_example.xcodeproj | ||
ios-src | ||
src | ||
.gitignore | ||
build_rust_deps.sh | ||
Cargo.toml | ||
Makefile |