Page 1 of 1

Hover and Select Images Not Working on Image Map Menu

Posted: Thu Feb 23, 2012 3:20 am
by mysterialize
I've been trying to get a set of image map menus working, and for the most part they function correctly with the code I've been using, but I can't seem to figure out how to get hover and select images to show up. Here's the code as it is right now on the save menu:

Code: Select all

init -2 python:
    layout.imagemap_load_save(
        "menu save.png",
        "menu save.png",
        "ink_hover.png",
        "menu_load_select.png",
        "menu save.png",
        [
            (290, 14, 350, 40, "previous"),
            (0, 0, 0, 0, "page_auto"),
            (345, 20, 405, 40, "page_1"),
            (390, 20, 440, 40, "page_2"),
            (440, 20, 490, 40, "page_3"),
            (480, 20, 530, 40, "page_4"),
            (520, 20, 570, 40, "page_5"),
            (585, 22, 635, 40, "next"),
                               
            (242, 80, 265, 125, "slot_0"),
            (420, 80, 448, 125, "slot_1"),
            (600, 80, 623,125, "slot_2"),
            (240, 230, 263, 275, "slot_3"),
            (415, 230, 438, 275, "slot_4"),
            (600, 235, 628, 280, "slot_5"),
            (240, 390, 263, 435, "slot_6"),
            (420, 390, 443, 435, "slot_7"),
            (600, 390, 623, 435, "slot_8"),
            ])
    

    style.file_picker_ss_window.xalign =0
    style.file_picker_ss_window.yalign = 0
    style.file_picker_text_window.xalign = 255
    style.file_picker_text_window.yalign = 95
    config.thumbnail_width = 120
    config.thumbnail_height = 100
In this case they just don't show up. The menu opens and functions just fine otherwise.

I've also tried it like this:

Code: Select all

init -2 python:
    layout.imagemap_load_save(
        ground "menu save.png",
        idle "menu save.png",
        hover "ink_hover.png",
        selected_idle "menu_load_select.png",
        selected_hover "menu save.png",
In which case it gives me a syntax error at start up, starting at "ground".

Thanks in advance.

Re: Hover and Select Images Not Working on Image Map Menu

Posted: Thu Feb 23, 2012 4:05 am
by Alex
Using layouts for customizing menus is an old style, so if you use Ren'Py 6.12.x or high you should use screens. In case you didn't see it yet, here it is a great tutorial of how you can do this.
http://lemmasoft.renai.us/forums/viewto ... t=tutorial

Re: Hover and Select Images Not Working on Image Map Menu

Posted: Thu Feb 23, 2012 4:24 am
by mysterialize
For some reason, while trying that, I got syntax errors from the start. It refuses to recognize the "Ground", "Hover", etc. keywords in any circumstance. I'm using version 6.13.7

Re: Hover and Select Images Not Working on Image Map Menu

Posted: Thu Feb 23, 2012 10:48 am
by Alex
It refuses to recognize the "Ground", "Hover", etc. keywords in any circumstance.
'Cause it is a screen language imagemap keywords and they work only in screens

Code: Select all

screen my_smth_screen:
    imagemap:
        ground ...
        hover ...
etc.
If you got errors using screens, you could post your code to let people find the problem.