documentation index ◦ reference manual ◦ function index
Function: | layout.imagemap_preferences | (ground, idle, hover, selected_idle, selected_hover, hotspots): |
This layout uses an imagemap to handle preferences.
ground - The displayable used for disabled buttons, and areas that are not in a hotspot.
idle - The displayable used for unfocused unselected hotspots.
hover - The displayable used for focused unselected hotspots.
selected_idle - The displayable used for unfocused selected hotspots.
selected_hover - The displayable used for focused selected hotspots.
hotspots - A list of tuples defining the hotspots. Each tuple consists of
There are two kinds of hotspots, buttons and bars. The buttons are:
The other type of hotspot is a horizontal bar. The selected images are used for the full portion of the bar, while the unselected images are used for the empty part of the bar. The known bars are:
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 is defined here.
init -2 python: layout.imagemap_preferences( "prefs_ground.jpg", "prefs_idle.jpg", "prefs_hover.jpg", "prefs_selected_idle.jpg", "prefs_selected_hover.jgp", [ (38, 62, 170, 121, "Window"), (175, 62, 296, 121, "Fullscreen"), (105, 150, 200, 185, "All"), (205, 150, 294, 185, "None"), (180, 300, 318, 339, "Joystick"), (410, 63, 479, 102, "Seen Messages"), (480, 63, 535, 102, "All Messages"), (384, 106, 548, 144, "Begin Skipping"), (403, 198, 466, 237, "Stop Skipping"), (467, 198, 543, 237, "Keep Skipping"), (725, 181, 790, 213, "Sound Test"), (564, 53, 788, 87, "Music Volume"), (565, 136, 789, 170, "Sound Volume"), (564, 252, 788, 286, "Voice Volume"), (318, 287, 542, 321, "Auto-Forward Time"), (56, 233, 278, 268, "Text Speed"), # Also define the game menu buttons. (26, 485, 168, 535, "Return"), (245, 485, 410, 535, "Save Game"), (522, 485, 688, 535, "Load Game"), (104, 535, 286, 589, "Preferences"), (374, 535, 550, 589, "Main Menu"), (675, 535, 790, 589, "Quit"), ])