[Solved] Imagemap - Selecting more than one

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Karas
Newbie
Posts: 4
Joined: Wed Mar 21, 2018 12:06 am
Contact:

[Solved] Imagemap - Selecting more than one

#1 Post by Karas »

Hello there lovely people,

The game designers of our team want some kind of circular or donut button menu.
I tried with imagebutton, but without results because the transparency of the PNG isn't taken and that broke the effect.

So then we tried with imagemap, but we are having this result with a quick prototype:
[youtube]
https://www.youtube.com/watch?v=RvAKufHXM2w[/youtube]

So basically the Red button works fine, but the blue one, when is selected, visually (only visually) highlights both buttons.

There is some way that we can resolve this? We already tried to reduce the hotspot area, and nothing.


Here is the chunk of code.

Code: Select all

screen rueda_deciciones():
    imagemap:
        idle "cake idle"
        hover "cake hover"

        hotspot (640, 353, 732, 411) action Notify(_("Elegiste Hobbies.")), Jump("hobbies") alt "Hobbies"
        hotspot (762, 441, 842, 559) action Notify(_("Elegiste University.")), Jump("university") alt "University"

Thanks in advance! :)
Last edited by Karas on Fri Mar 23, 2018 10:28 pm, edited 1 time in total.

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: Imagemap - Selecting more than one

#2 Post by DannX »

Using imagebutton, did you try setting the focus_mask property to True? Doing so make its so only non-transparent areas of the button are clickable, if that was the problem you had with imagebutton.

User avatar
Karas
Newbie
Posts: 4
Joined: Wed Mar 21, 2018 12:06 am
Contact:

Re: Imagemap - Selecting more than one

#3 Post by Karas »

Thanks DannX, today I will try that, and report you, I don't acknowledged the focus_mask property.



UPDATE:
it works! Thanks a lot DannX!

The only problem its having is that when is partially selected the buttons has some spasm effect until you center the cursor on them, but by the moment is all what we need.

Thanks!

Solved

Post Reply

Who is online

Users browsing this forum: No registered users