You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, the only way to gracefully quit a Game after Game::run is to implement Game::on_close_request and wait for a close request.
However, it is very common in games to have a UI option to "Quit the game". While we can use std::process::exit, it's not ideal as it doesn't gracefully stop the execution.
Therefore, I think we need to rethink the Game API a bit to allow graceful quits on demand.
The text was updated successfully, but these errors were encountered:
As of now, the only way to gracefully quit a
Game
afterGame::run
is to implementGame::on_close_request
and wait for a close request.However, it is very common in games to have a UI option to "Quit the game". While we can use
std::process::exit
, it's not ideal as it doesn't gracefully stop the execution.Therefore, I think we need to rethink the
Game
API a bit to allow graceful quits on demand.The text was updated successfully, but these errors were encountered: