-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove close_on_esc #12859
remove close_on_esc #12859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can think if we will have this kind of helper systems in the future, but should probably be much more configurable and inside some toolbox or plugin. Lets remove this!
@DJMcNab I think you want to keep it? |
I mean, I'm not using Bevy regularly at the moment, so I'm not really that bothered either way. I do find the equivalent functionality in Vello's example to be very useful though. |
# 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(); } } } ```
Please don't link Discord in PR descriptions unless absolutely necessary. I spent 10 min trying to find an explanation, I can't. The only thing I find on Discord is people complaining that it was removed too quickly and/or arguing it should have been kept and is very useful, which doesn't really help support the cause for this PR. @matiqo15 @alice-i-cecile @mockersf |
Addresses Bevy #12859 (bevyengine/bevy#12859)
Addresses Bevy #12859 (bevyengine/bevy#12859)
Objective
close_on_esc
Migration Guide
close_on_esc
in their application will have to replace it with their own solution.