Skip to content

Commit

Permalink
Update system.rs docs in bevy_input (bevyengine#4524)
Browse files Browse the repository at this point in the history
# Objective

- Part of the splitting process of bevyengine#3692.

## Solution

- Document `system.rs` inside of `bevy_input`.
  • Loading branch information
KDecay authored and ItsDoot committed Feb 1, 2023
1 parent 763d40a commit f1b3560
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions crates/bevy_input/src/system.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
use crate::{
keyboard::{KeyCode, KeyboardInput},
ElementState,
};
use crate::{ElementState, KeyCode, KeyboardInput};
use bevy_app::AppExit;
use bevy_ecs::prelude::{EventReader, EventWriter};

/// Sends the `AppExit` event whenever the "esc" key is pressed.
/// Sends an [`AppExit`] event whenever the `ESC` key is pressed.
///
/// ## Note
///
/// This system is not added as part of the `DefaultPlugins`. You can add the [`exit_on_esc_system`]
/// yourself if desired.
pub fn exit_on_esc_system(
mut keyboard_input_events: EventReader<KeyboardInput>,
mut app_exit_events: EventWriter<AppExit>,
Expand Down

0 comments on commit f1b3560

Please sign in to comment.