Difference between revisions of "Advanced Engine Features"

Jump to navigation Jump to search
→‎RTL ("Return to Launcher") support: Update feature and event names
(→‎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 EVENT_RTL 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.  
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;


kSupportsRTL feature flag
kSupportsReturnToLauncher feature flag
</syntaxhighlight>
</syntaxhighlight>


TrustedUser
2,147

edits

Navigation menu