documentation index ◦ reference manual ◦ function index

# 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:

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. 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"),
            ])

documentation index ◦ reference manual ◦ function index