Imagebutton - simple fade in/out hover

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
Rainz
Newbie
Posts: 3
Joined: Sat Dec 02, 2017 9:13 am
Contact:

Imagebutton - simple fade in/out hover

#1 Post by Rainz »

Been struggling with a simple fade of a imagebutton. Specifically the hover-out/mouseout of the fade.

The fade in works as expected, but the fade out when hovering off the image instantly hides with no fade at all. What am i doing wrong here?

This is something like what i've got:

Code: Select all

transform simpleFade:
    on idle:
        linear 0.5 alpha 0.0
    on hover, show:
        linear 0.5 alpha 1.0 
    on hide:
        linear 0.5 alpha 0.0 

imagebutton:
    idle 'pic.png'
    hover 'pic-hover.png'
    focus_mask True
    at simpleFade
    action [Call('dosomething')]

User avatar
Kia
Eileen-Class Veteran
Posts: 1039
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Imagebutton - simple fade in/out hover

#2 Post by Kia »

I don't see any problem in the transform code, it must have something to do with the images you are displaying, is one of them fully transparent?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Vamp-sama