Update system.rs docs in bevy_input (#4524)

# Objective

- Part of the splitting process of #3692.

## Solution

- Document `system.rs` inside of `bevy_input`.
This commit is contained in:
KDecay 2022-04-20 03:06:31 +00:00
parent 7557f4db83
commit 46321930f2

View file

@ -1,11 +1,13 @@
use crate::{ use crate::{ElementState, KeyCode, KeyboardInput};
keyboard::{KeyCode, KeyboardInput},
ElementState,
};
use bevy_app::AppExit; use bevy_app::AppExit;
use bevy_ecs::prelude::{EventReader, EventWriter}; 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( pub fn exit_on_esc_system(
mut keyboard_input_events: EventReader<KeyboardInput>, mut keyboard_input_events: EventReader<KeyboardInput>,
mut app_exit_events: EventWriter<AppExit>, mut app_exit_events: EventWriter<AppExit>,