layout.imagemap yesno prompt - Ren'Py

documentation index ◦ reference manual ◦ function index

# layout.imagemap_yesno_prompt

Function: | layout.imagemap_yesno_prompt | (ground, idle, hover, hotspots):

This layout uses an imagemap to handle prompting the user with yes/no questions.

ground - The displayable used for disabled buttons, and areas that are not in a hotspot.

idle - The displayable used for unfocused hotspots.

hover - The displayable used for focused hotspots.

hotspots - A list of tuples defining the hotspots. Each tuple consists of

1. The x-coordinate of the left side.
2. The y-coordinate of the top side.
3. The x-coordinate of the right side.
4. The y-coordinate of the bottom side.
5. The button replaced by this hotspot (one of "Yes" or "No").

Placement of the prompt text can be controlled using style.yesno_prompt, with the style of the text proper being controlled by style.yesno_prompt_text.

Despite the name, this function can take arbitrary displayables as well as images. The images or displayables used should be transparent to allow the navigation to show through.

    init -2 python:
        layout.imagemap_yesno_prompt(
            "yesno_ground.png",
            "yesno_idle.png",
            "yesno_hover.png",
            [
                (211, 228, 320, 280, "Yes"),
                (490, 228, 575, 280, "No"),
                ])

        style.yesno_prompt.yalign = 0.25

documentation index ◦ reference manual ◦ function index