documentation index ◦ reference manual ◦ function index
Function: | ui.callsinnewcontext | (label, *args, **kwargs): |
This function returns a function that, when called, calls the supplied label in a new context. Additional positional and keyword arguments are passed in to the called label.
init python: def overlay(): ui.textbutton("Save", clicked=ui.callsinnewcontext("_game_menu_save"), xalign=0.0, yalign=0.0) ui.textbutton("Prefs", clicked=ui.callsinnewcontext("_game_menu", "_prefs_screen"), xalign=1.0, yalign=0.0) config.overlay_functions.append(overlay)