TrustedUser
2,147
edits
(→RTL ("Return to Launcher") support: Update engine status) |
(→RTL ("Return to Launcher") support: Update feature and event names) |
||
Line 38: | Line 38: | ||
'''How to implement it'''<br> | '''How to implement it'''<br> | ||
You can implement this by checking for and honoring the | You can implement this by checking for and honoring the EVENT_RETURN_TO_LAUNCHER event. A much easier way, which also gives you some other advantages (e.g. this also covers EVENT_QUIT), is to regularly poll the return value of Engine::shouldQuit(). If it returns true, you should break out from your main game loop and your Engine::run() method should return to the caller. | ||
'''Relevant Engine API''' | '''Relevant Engine API''' | ||
Line 45: | Line 45: | ||
bool shouldQuit() const; | bool shouldQuit() const; | ||
kSupportsReturnToLauncher feature flag | |||
</syntaxhighlight> | </syntaxhighlight> | ||