or ui.callsinnewcontext to call the _game_menu label with a parameter, the name of the screen you wish to enter. This parameter can be omitted to enter the default screen.
This can be omitted to use the default screen.
init python:
def overlay():
# We can assume that "save_screen" is the default.
ui.textbutton("Save", clicked=ui.callsinnewcontext("_game_menu"), xalign=0.0, yalign=0.0)
ui.textbutton("Prefs", clicked=ui.callsinnewcontext("_game_menu", "preferences_screen"), xalign=1.0, yalign=0.0)
config.overlay_functions.append(overlay)
documentation index ◦ reference manual ◦ function index