-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add dragged field to pointer click and release #21149
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
base: main
Are you sure you want to change the base?
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
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.
Pull Request Overview
Adds a dragged
field to pointer click and release events to enable better mobile UI handling by distinguishing between clicks and scroll gestures. This allows scrollable lists with clickable items to work properly on mobile devices.
- Added
dragged
boolean field toClick
andRelease
structs - Updated event generation logic to track dragging state during pointer interactions
- Provided example demonstrating mobile scrollable list implementation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
crates/bevy_picking/src/events.rs | Adds dragged field to Click and Release events and implements dragging detection |
examples/ui/mobile_list.rs | New example demonstrating mobile scrollable list with clickable items |
Cargo.toml | Registers the new mobile_list example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Resolves #18923 |
The generated |
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'm fine with this as it relates to the pointer event dispatch logic. Will leave it to others to say if this is how we prefer to resolve #18923.
Objective
Solution
Testing
Showcase
An example of use is given in examples/ui/mobile_list.rs