-
Notifications
You must be signed in to change notification settings - Fork 355
Description
There's a few examples that call View.close
on ESC
key.
Here:
arcade/arcade/examples/astar_pathfinding.py
Lines 216 to 218 in 333ce6e
# Close the window / exit game | |
elif key == arcade.key.ESCAPE: | |
self.close() |
Here:
arcade/arcade/examples/asteroid_smasher.py
Lines 317 to 319 in 333ce6e
# Quit if the player hits escape | |
elif symbol == arcade.key.ESCAPE: | |
self.close() |
Here, but it's dead code since ESC is tested twice in elif statements and only the first is executed:
arcade/arcade/examples/dual_stick_shooter.py
Lines 278 to 282 in 333ce6e
elif key == arcade.key.ESCAPE: | |
self.player.start_pressed = True | |
# close the window if the user hits the escape key | |
elif key == arcade.key.ESCAPE: | |
self.close() |
Here:
arcade/arcade/examples/slime_invaders.py
Lines 202 to 203 in 333ce6e
if key == arcade.key.ESCAPE: | |
self.close() |
I presume this is a recent API change, but I don't see it mentioned here!?
https://github.com/pythonarcade/arcade/blob/development/CHANGELOG.md#window-and-view
What is the proper fix / coding pattern here to process ESC when sub-classing arcade.View?
I can send a PR if you let me know.