-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Merged by Bors] - Update mouse.rs
docs in bevy_input
#4518
Conversation
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.
Finally some doc! 👍
Though there are some awkward bits that I think could be left out.
crates/bevy_input/src/mouse.rs
Outdated
/// resource. The resource stores the data of the buttons of a mouse and can be accessed | ||
/// inside of a system. |
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 don't understand this bit: "The resource stores the data of the buttons of a mouse"
/// resource. The resource stores the data of the buttons of a mouse and can be accessed | |
/// inside of a system. | |
/// resource. It can be accessed inside of a system with a `Res<Input<MouseButton>>` | |
/// parameter. |
(Second half is just a suggestion. It's only the "data of a button" that I think should be really fixed)
crates/bevy_input/src/mouse.rs
Outdated
/// | ||
/// This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. | ||
/// It is available to the end user and can be used for game logic. |
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.
/// | |
/// This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. | |
/// It is available to the end user and can be used for game logic. |
crates/bevy_input/src/mouse.rs
Outdated
/// | ||
/// This event is the translated version of the `DeviceEvent::MouseMotion` from the `winit` crate. | ||
/// It is available to the end user and can be used for game logic. |
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.
/// | |
/// This event is the translated version of the `DeviceEvent::MouseMotion` from the `winit` crate. | |
/// It is available to the end user and can be used for game logic. |
crates/bevy_input/src/mouse.rs
Outdated
/// | ||
/// This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate. | ||
/// It is available to the end user and can be used for game logic. |
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.
/// | |
/// This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate. | |
/// It is available to the end user and can be used for game logic. |
Is it relevant to the end user to say "this comes from the winit
crate"? I don't feel like so.
Regardless, I think "It is available to the end user and can be used for game logic." doesn't add much value and should be removed.
Co-authored-by: Troels Jessen <kairyuka@gmail.com> Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
@nicopap I can see how it could be confusing. Do you like "The resource stores the state of the mouse buttons" more?
I wouldn't say so. The The addition of the actual resource type you would have to use ( |
I think the I mean that "It is available to the end user" is a bit redundant on a doc string. As a user, I don't really need to know that a type is available to me in a documentation page. If I am reading the documentation for that type, it means that necessarily it is available to me, so no need to tell it. Maybe just keeping "this can be used in game logic"? "Store the data of a button" is a bit of an awkward sentence. And all things considered, doesn't add much that is not already said, I find the doc is improved with the sentence removed. |
Happy to merge this once @nicopap approves :) |
Ah, this github ui confuses me. It's all good for me now |
bors r+ |
Timed out. |
bors r+ |
mouse.rs
docs in bevy_input
mouse.rs
docs in bevy_input
# Objective - Part of the splitting process of bevyengine#3692. ## Solution - Document `mouse.rs` inside of `bevy_input`. Co-authored-by: KDecay <KDecayMusic@protonmail.com>
# Objective - Part of the splitting process of bevyengine#3692. ## Solution - Document `mouse.rs` inside of `bevy_input`. Co-authored-by: KDecay <KDecayMusic@protonmail.com>
Objective
bevy_input
#3692.Solution
mouse.rs
inside ofbevy_input
.