documentation index ◦ reference manual ◦ function index
Function: | ui.jumps | (label, transition=None): |
This function returns a function that, when called, jumps the game to the given label, ending the current interaction in the process. It's best used to supply the clicked argument to the various button widgets.
transition, if not None, specifies a transition to be used when the next interaction occurs. This may either be a transition, or a string. If a string, it is interpreted as a field on the config object, which is accessed to determine the transition that should occur. (new in 6.9.0)
init: python hide: # The contents of the main menu. config.main_menu = [ ( u"Start Game", "start", 'True'), ( u"Load Game", ui.jumps("load_screen", "main_game_transition"), 'True' ), ( u"Preferences", ui.jumps("preferences_screen", "main_game_transition"), 'True' ), ( u"Quit", ui.jumps("_quit"), 'True' ), ]