Function bevy::window::close_on_esc
pub fn close_on_esc(
focused: Local<'_, Option<WindowId>>,
focused_events: EventReader<'_, '_, WindowFocused>,
windows: ResMut<'_, Windows>,
input: Res<'_, Input<KeyCode>>
)
Expand description
Close the focused window whenever the escape key (Esc) is pressed
This is useful for examples or prototyping.