documentation index ◦ reference manual ◦ function index
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
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.
Hotspot functions may also include the untranslated names of game menu buttons. If at least one such button is defined, the navigation is not shown, and the imagemap is expected to define all relevant game menu buttons.
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, unless the game menu buttons are defined here.
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