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 exjam committed May 22, 2022
1 parent 0b8e0d6 commit 382c3d0
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 382c3d0

Please sign in to comment.