imagebutton "hovered" action to show image[SOLVED]

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
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

imagebutton "hovered" action to show image[SOLVED]

#1 Post by TellerFarsight »

Code: Select all

        imagebutton:
            idle ("gui/profile/eileenprofile.png")
            hover ("gui/profile/eileenprofilehover.png")
            hovered Show("eileen right neutral") at right_enter
            unhovered Show("eileen right neutral") at right_exit
            action Show('profile_display',fade)
I have an imagebutton here, with its idle and hover states, but I want it so that when the button gains focus, the character sprite appears, and it leaves when the button loses focus. The sprite image doesn't become the new button, so I can't work it into idle and hover (I guess I could but that's probably dumb).
The way I have it now doesn't work because "eileen right neutral" is an image and not a screen. Is there a way to display an image like this with a transform, or am I going to have to actually create a screen that has the image and then display that?

EDIT: I need to stop answering my own questions.
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

Post Reply

Who is online

Users browsing this forum: Google [Bot]