[Merged by Bors] - Update MouseMotion and CursorMoved docs#5090
Closed
Nilirad wants to merge 3 commits intobevyengine:mainfrom
Closed
[Merged by Bors] - Update MouseMotion and CursorMoved docs#5090Nilirad wants to merge 3 commits intobevyengine:mainfrom
MouseMotion and CursorMoved docs#5090Nilirad wants to merge 3 commits intobevyengine:mainfrom
Conversation
Nilirad
commented
Jun 24, 2022
Nilirad
commented
Jun 24, 2022
alice-i-cecile
requested changes
Jun 25, 2022
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
These are a solid improvement. I would like to see:
- Links between these types, with an explanation of the differences.
- A note in the docs recording your observation about
MouseMotionand multiple pointing devices.
alice-i-cecile
approved these changes
Jun 25, 2022
Contributor
Author
|
I only added a link to |
Weibye
approved these changes
Jun 26, 2022
Contributor
Weibye
left a comment
There was a problem hiding this comment.
I think this looks good as is, see comments but those should not be blocking
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Jun 26, 2022
# Objective - Fixes #5083 ## Solution I looked at the implementation of those events. I noticed that they both are adaptations of `winit`'s `DeviceEvent`/`WindowEvent` enum variants. Therefore I based the description of the items on the documentation provided by the upstream crate. I also added a link to `CursorMoved`, just like `MouseMotion` already has. ## Observations - Looking at the implementation of `MouseMotion`, I noticed the `DeviceId` field of the `winit` event is discarded by `bevy_input`. This means that in the case a machine has multiple pointing devices, it is impossible to distinguish to which one the event is referring to. **EDIT:** just tested, `MouseMotion` events are emitted for movement of both mice.
Contributor
MouseMotion and CursorMoved docsMouseMotion and CursorMoved docs
inodentry
pushed a commit
to IyesGames/bevy
that referenced
this pull request
Aug 8, 2022
# Objective - Fixes bevyengine#5083 ## Solution I looked at the implementation of those events. I noticed that they both are adaptations of `winit`'s `DeviceEvent`/`WindowEvent` enum variants. Therefore I based the description of the items on the documentation provided by the upstream crate. I also added a link to `CursorMoved`, just like `MouseMotion` already has. ## Observations - Looking at the implementation of `MouseMotion`, I noticed the `DeviceId` field of the `winit` event is discarded by `bevy_input`. This means that in the case a machine has multiple pointing devices, it is impossible to distinguish to which one the event is referring to. **EDIT:** just tested, `MouseMotion` events are emitted for movement of both mice.
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Oct 28, 2022
# Objective - Fixes bevyengine#5083 ## Solution I looked at the implementation of those events. I noticed that they both are adaptations of `winit`'s `DeviceEvent`/`WindowEvent` enum variants. Therefore I based the description of the items on the documentation provided by the upstream crate. I also added a link to `CursorMoved`, just like `MouseMotion` already has. ## Observations - Looking at the implementation of `MouseMotion`, I noticed the `DeviceId` field of the `winit` event is discarded by `bevy_input`. This means that in the case a machine has multiple pointing devices, it is impossible to distinguish to which one the event is referring to. **EDIT:** just tested, `MouseMotion` events are emitted for movement of both mice.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
# Objective - Fixes bevyengine#5083 ## Solution I looked at the implementation of those events. I noticed that they both are adaptations of `winit`'s `DeviceEvent`/`WindowEvent` enum variants. Therefore I based the description of the items on the documentation provided by the upstream crate. I also added a link to `CursorMoved`, just like `MouseMotion` already has. ## Observations - Looking at the implementation of `MouseMotion`, I noticed the `DeviceId` field of the `winit` event is discarded by `bevy_input`. This means that in the case a machine has multiple pointing devices, it is impossible to distinguish to which one the event is referring to. **EDIT:** just tested, `MouseMotion` events are emitted for movement of both mice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Solution
I looked at the implementation of those events. I noticed that they both are adaptations of
winit'sDeviceEvent/WindowEventenum variants. Therefore I based the description of the items on the documentation provided by the upstream crate. I also added a link toCursorMoved, just likeMouseMotionalready has.Observations
MouseMotion, I noticed theDeviceIdfield of thewinitevent is discarded bybevy_input. This means that in the case a machine has multiple pointing devices, it is impossible to distinguish to which one the event is referring to. EDIT: just tested,MouseMotionevents are emitted for movement of both mice.