ImageMap - Pressed/MouseDown State

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
DarkClaymore
Regular
Posts: 57
Joined: Thu Jan 14, 2010 3:45 pm
Completed: Marriage Contract, Black Nirvana
Projects: God Vessel Online
Contact:

ImageMap - Pressed/MouseDown State

#1 Post by DarkClaymore » Sun Jan 05, 2014 1:51 pm

In my ImageMap title screen, I want the hotspot buttons to have an additional display state, for when they are being clicked. In other words, when the mouse button is being pressed down and hovers above the hotspot.

It seems like a trivial thing to do, but I failed to find a solution for this.
Need some help with this :?

Tsapas
Regular
Posts: 69
Joined: Mon Oct 14, 2013 8:18 am
Contact:

Re: ImageMap - Pressed/MouseDown State

#2 Post by Tsapas » Sun Jan 05, 2014 3:15 pm

try adding a selected_hover state along with idle and hover states (or anything else you use), like:

Code: Select all

imagemap:
        idle "gui/imagemap_idle.png"
        hover "gui/imagemap_hover.png"
        selected_hover "gui/imagemap_sel_hover.png"
or if you use the auto imagemap definition, just add a whatever-the-image-name-is_selected_idle.png in the folder with the rest of the images.

(Dunno if this is what exactly what you are looking for because *I think* that the selected state is applied on mousebutton release, not press, but worth a shot).

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: ImageMap - Pressed/MouseDown State

#3 Post by PyTom » Sun Jan 05, 2014 3:36 pm

No, this won't work. Ren'Py doesn't support a pressed state.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Google [Bot]