Skip to content

Commit b9ab17e

Browse files
Bevy Input Docs : lib.rs (#9468)
# Objective Complete the documentation of `bevy_input` (#3492). This PR is part of a triptych of PRs : - #9467 - #9469 ## Solution Add missing documentation on items in `lib.rs`. --------- Co-authored-by: Pascal Hertleif <[email protected]>
1 parent 0087556 commit b9ab17e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_input/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
5252
#[derive(Default)]
5353
pub struct InputPlugin;
5454

55+
/// Label for systems that update the input data.
5556
#[derive(Debug, PartialEq, Eq, Clone, Hash, SystemSet)]
5657
pub struct InputSystem;
5758

@@ -148,11 +149,14 @@ impl Plugin for InputPlugin {
148149
reflect(Serialize, Deserialize)
149150
)]
150151
pub enum ButtonState {
152+
/// The button is pressed.
151153
Pressed,
154+
/// The button is not pressed.
152155
Released,
153156
}
154157

155158
impl ButtonState {
159+
/// Is this button pressed?
156160
pub fn is_pressed(&self) -> bool {
157161
matches!(self, ButtonState::Pressed)
158162
}

0 commit comments

Comments
 (0)