docs: Fix incorrect cycle_modes function documentation (#18237)

Update the documentation comment to correctly state that the function
responds to spacebar presses rather than mouse clicks. This aligns the
documentation with the actual implementation, which was already using
keyboard input.

# Objective

- Fix incorrect documentation comment for the cycle_modes function that
inaccurately described using mouse input when the implementation
actually uses spacebar.
- This ensures documentation accuracy and prevents confusion for new
learners.

## Solution

- Updated the documentation comment to correctly state that the function
responds to spacebar presses rather than mouse clicks.
- The code functionality remains unchanged.
This commit is contained in:
Emmet_v15 2025-03-10 22:00:45 +00:00 committed by GitHub
parent e24191dd89
commit ed529a7cae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ pub(crate) mod test_setup {
window::RequestRedraw, window::RequestRedraw,
}; };
/// Switch between update modes when the mouse is clicked. /// Switch between update modes when the spacebar is pressed.
pub(crate) fn cycle_modes( pub(crate) fn cycle_modes(
mut mode: ResMut<ExampleMode>, mut mode: ResMut<ExampleMode>,
button_input: Res<ButtonInput<KeyCode>>, button_input: Res<ButtonInput<KeyCode>>,