renpy/doc/reference/functions/layout.imagemap main menu
From Ren'Py
layout.imagemap_main_menu
| Function: | layout.imagemap_main_menu | (ground, selected, hotspots): |
ground - The ground image. This is used for hotspots that are not selected.
selected - The selected image. This used for hotspots that are selected.
hotspots - A list of tuples defining the hotspot. Each tuple consists of:
- The x-coordinate of the left side.
- The y-coordinate of the top side.
- The x-coordinate of the right side.
- The y-coordinate of the bottom side.
- Either the (untranslated) name of the main menu button this hotspot is equivalent to, or, a label in the program to jump to when this hotspot is clicked.
Despite the name, this function can take arbitrary displayables (like Animations) as well as images.
Example
init -2 python: layout.imagemap_main_menu("menu2.jpg", "menu1.jpg", [ (111, 248, 392 ,313, "Start Game"), (111, 313, 392, 378, "Continue Game"), (48, 432, 237, 529, "Preferences"), (48,529,237,576, "Quit"), (48, 435, 237, 482, "instructions"), ])
