Interrupt / delverengine

Delver game engine and editor
zlib License
803 stars 79 forks source link

Better Gamepad Menu Support + Quit Button #280

Closed joshuaskelly closed 2 years ago

joshuaskelly commented 2 years ago

image

Summary

I reworked how Overlays handle the menu cancel event. I added the new method back() to the Overlay class to handle this logic. By default it preserves old behavior, but in the various options overlays it calls saveAndClose() which goes back to the previous overlay.

I also added a quit button as a convenience for our desktop players who may not have access to a keyboard.

Open Questions

  1. Should we present a "Do you want to quit?" overlay when quitting?
  2. Should pressing back on the main menu screen quit the game?
PythooonUser commented 2 years ago

Regarding your questions:

Should we present a "Do you want to quit?" overlay when quitting?

Does it give a benefit? Like, do we need to save something before quitting? I think nothing happens when you just quit, as it is now, so I would not add it.

Should pressing back on the main menu screen quit the game?

What exactly do you mean? Is it hitting ESC on the keyword? So is this the current behavior? Otherwise, this could lead to accidentally quitting the game, which might be frustrating?

Interrupt commented 2 years ago

The crash seems to be happening after the second call to super.draw() in the SplashScreen class