documentation indexreference manualfunction index

theme.image_buttons

This function provides a way to automatically convert textbuttons to imagebuttons, based on the text that would be displayed on the textbutton. This applies both to standard Ren'Py buttons ("Start Game", "Main Menu", etc) and also to buttons produced by ui.textbutton.

Function: theme.image_buttons (d):

Used to define buttons in terms of 5-tuples of image filenames. This expects its single parameter, d, to be a dictionary mapping untranslated button names to 5-tuples. Each 5-tuple should contain 5 filenames, giving the image used for the button when:

in that order.

init python hide:
    buttons = dict()
    buttons["Start Game"] = (
        "theme/Start Game.idle.png",
        "theme/Start Game.hover.png",
        "theme/Start Game.selidle.png",
        "theme/Start Game.selhover.png",
        "theme/Start Game.insensitive.png"
        )

    theme.image_buttons(buttons)

documentation indexreference manualfunction index