mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
6ccb2a306e
# Objective - Remove `close_on_esc` - For context about why we are removing it see: [discord](https://discordapp.com/channels/691052431525675048/692572690833473578/1225075194524073985) ## Migration Guide - Users who added `close_on_esc` in their application will have to replace it with their own solution. ```rust pub fn close_on_esc( mut commands: Commands, focused_windows: Query<(Entity, &Window)>, input: Res<ButtonInput<KeyCode>>, ) { for (window, focus) in focused_windows.iter() { if !focus.focused { continue; } if input.just_pressed(KeyCode::Escape) { commands.entity(window).despawn(); } } } ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |