documentation index ◦ reference manual ◦ function index

# ui.gamemenus

Function: | ui.gamemenus | (screen=None):

This function returns a function that, when called, enters the game menu. If screen is given, that screen is initially shown. It may be one of "load_screen", "save_screen", or "preferences_screen". If not, the default screen is used.

    init python:
        def overlay():
             ui.textbutton("Prefs", clicked=ui.gamemenus("preferences_screen"), xalign=1.0, yalign=0.0)

        config.overlay_functions.append(overlay)

documentation index ◦ reference manual ◦ function index