documentation index ◦ reference manual ◦ function index

# ui.add

Function: | ui.add | (w, make_current=False, once=False):

This is used to add a displayable to the current widget. If make_current is True, then the widget is made the current widget. If once is True, then the displayable will be made the current widget, but only for the next widget to be added.

## Example

    # This is called when the quick save button is clicked.
    label _quick_save:
        call _enter_menu_without_scene from __call__enter_menu_4

        # Save the game.
        $ renpy.save('quicksave', _('Quick Save'))

        # Tell the user that we saved the game.
        $ ui.add(Solid((0, 0, 0, 128))) # adds a full screen 50% transparent black overlay
        $ ui.text(_('The game has been saved using quick save.'),
                  xpos=0.5, xanchor='center', ypos=0.5, yanchor='center')

        $ ui.saybehavior()
        $ ui.interact(suppress_overlay=True, suppress_underlay=True)

        return

documentation index ◦ reference manual ◦ function index