bevy/crates/bevy_dev_tools
Mateusz Wachowiak 6ccb2a306e
remove close_on_esc (#12859)
# 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();
        }
    }
}
```
2024-04-03 18:02:50 +00:00
..
src remove close_on_esc (#12859) 2024-04-03 18:02:50 +00:00
Cargo.toml Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00