-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Add exit_on_esc_system to examples with window #2121
Conversation
I personally think we should only add this system to "real games" (currently "breakout" and "alien cake addict"). In general I want the examples to be "minimal / noise free". They exist to show exactly what they set out to and nothing else. "Exit on esc" behavior is in a class of thing that we have intentionally excluded from examples in the past. |
Following the discussion about ux I thought it'd be handy to close the examples with esc. When looking at the examples I liked going over them fast to see what they were about and the ESC option would have been nice, but I can see why having it only on the game examples is a good idea. I'll update the pr removing the line to the non game examples |
Just needs a |
I ran it and it fixed a file, thanks for mentioning it |
I've added this to #2094 as well, so we should be able to merge this, then my PR and let my PR take priority in any merge conflicts. |
bors r+ |
This covers issue #2110 It adds the line `.add_system(bevy::input::system::exit_on_esc_system.system())` before `.run()` to every example that uses a window, so users have a quick way to close the examples. I used the full name `bevy::input::system::exit_on_esc_system`, I thought it gave clarity about being a built-in system. The examples excluded from the change are the ones in the android, ios, wasm folders, the headless examples and the ecs/system_sets example because it closes itself.
Pull request successfully merged into main. Build succeeded: |
This covers issue bevyengine#2110 It adds the line `.add_system(bevy::input::system::exit_on_esc_system.system())` before `.run()` to every example that uses a window, so users have a quick way to close the examples. I used the full name `bevy::input::system::exit_on_esc_system`, I thought it gave clarity about being a built-in system. The examples excluded from the change are the ones in the android, ios, wasm folders, the headless examples and the ecs/system_sets example because it closes itself.
This covers issue #2110
It adds the line
.add_system(bevy::input::system::exit_on_esc_system.system())
before.run()
to every example that uses a window, so users have a quick way to close the examples.
I used the full name
bevy::input::system::exit_on_esc_system
, I thought it gave clarity about being a built-in system.The examples excluded from the change are the ones in the android, ios, wasm folders, the headless
examples and the ecs/system_sets example because it closes itself.