Skip to content
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

rename touchpad to gesture, and add new gestures #13660

Merged
merged 8 commits into from
Jun 4, 2024

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Jun 3, 2024

Objective

  • With the recent winit update, touchpad specific events can also be triggered on mobile

Solution

  • Rename them to gestures and add support for the new ones

Testing

  • Tested on the mobile example on iOS
ios-rotation.mp4

Migration Guide

  • TouchpadMagnify has been renamed to PinchGesture
  • TouchpadRotate has been renamed to RotationGesture

@mockersf mockersf added A-Input Player input via keyboard, mouse, gamepad, and more O-MacOS Specific to the MacOS (Apple) desktop operating system O-iOS Specific to the iOS mobile operating system labels Jun 3, 2024
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible M-Needs-Release-Note Work that should be called out in the blog due to impact S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 3, 2024
@alice-i-cecile alice-i-cecile removed the M-Needs-Release-Note Work that should be called out in the blog due to impact label Jun 3, 2024
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvements. I am not thrilled about the platform-specific limitations, but this is an incremental improvement nonetheless.

@mockersf
Copy link
Member Author

mockersf commented Jun 3, 2024

there's a PR to add some of them to Wayland rust-windowing/winit#3656, and I started looking for Android

crates/bevy_window/src/window.rs Outdated Show resolved Hide resolved
crates/bevy_window/src/window.rs Outdated Show resolved Hide resolved
crates/bevy_window/src/window.rs Outdated Show resolved Hide resolved
crates/bevy_window/src/window.rs Outdated Show resolved Hide resolved
/// - Only used on iOS.
/// - On macOS, they are recognized by default and can't be disabled.
pub recognize_doubletap_gesture: bool,
/// Sets whether this window recognize [`PanGesture`], with a number of fingers between the first value and the last.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be my ignorance, what does number of fingers between the first value and the last mean?

recognize_pan_gesture: Some((0, 5)) would this be like a whole hand?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the number of fingers you use at the same time for the gesture, so (0, 5) would detect pan gesture with 0, 1, 2, 3, 4 or 5 fingers.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 4, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 4, 2024
Merged via the queue into bevyengine:main with commit df57850 Jun 4, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Feature A new feature, making something new possible O-iOS Specific to the iOS mobile operating system O-MacOS Specific to the MacOS (Apple) desktop operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants