Page 1 of 1

Clicked hotspots on transparent images

Posted: Fri Oct 28, 2022 7:45 pm
by Jetar
Well, I've got another question.

I've got screen with an imagemap, which has ground and hover images. Ground and hover images are mostly transparent. I need to set some transparent area of that images as a hotspot. Or some kind of button. But, as I see, RenPy disallow that because it recognises as hover and clicked area only non-transparetn part of the image.

So please give me some advice. What ca I implement to get transparent image part to be clickable?

Re: Clicked hotspots on transparent images

Posted: Fri Oct 28, 2022 9:17 pm
by laure44
The alpha property used by imagemaps is set on True by default, but you can set it to False.

(You can check all the properties in the documentation https://www.renpy.org/doc/html/screens. ... p#imagemap )

Code: Select all

imagemap:
    alpha False

Re: Clicked hotspots on transparent images

Posted: Sat Oct 29, 2022 5:06 am
by Jetar
laure44 wrote:
Fri Oct 28, 2022 9:17 pm
The alpha property used by imagemaps is set on True by default, but you can set it to False.
Thank you.

This option is good, but it turns my hard-shaped buttons into rectangulars. Thats not good. I've decided just to put some color filling with low opacity on my idle/hover images, so renpy's alpha algorythms will recognize needed areas.

I think, next time I will use imagebuttons with hover alpha functions.

Re: Clicked hotspots on transparent images

Posted: Sat Oct 29, 2022 6:14 am
by Ocelot
Yes, that was one of the reasons, why I had to drop imagemaps and transition to imagebuttons. Hope this will be the only issue you encounter.