[Merged by Bors] - Add exit_on_esc_system to examples with window#2121
[Merged by Bors] - Add exit_on_esc_system to examples with window#2121giusdp wants to merge 3 commits intobevyengine:mainfrom giusdp:main
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.