Transitioning Background When Button is Hovered

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
Posts: 4
Joined: Fri Apr 23, 2021 8:09 pm
Projects: Diabolik Lovers (OC Route)
Tumblr: the-mostdiabolik-of-lovers

Transitioning Background When Button is Hovered

#1 Post by birdtrappedinacage » Tue May 04, 2021 7:09 pm

Hello! I found a post on this topic before but it didn't exactly help me and wasn't quite what I was looking for.

I was wondering if there was a simple way (preferably using image buttons) to have the background of a screen fade to a new background when a specific button is hovered. I was hoping to do this for multiple buttons on one screen (like a character select menu that shows a preview of the character in the background when hovering over their 'select' button).

Hopefully this makes sense. ^^

User avatar
Posts: 93
Joined: Fri Jun 23, 2017 2:23 pm

Re: Transitioning Background When Button is Hovered

#2 Post by emz911 » Wed May 05, 2021 1:25 pm

Reference viewtopic.php?t=45661, you can show an image on screen with a transform by setting the hovered action of your image button to:

Code: Select all

Function(, "my_image", at_list=[my_transform])
Also remember to hide the other images on hover as well.

Post Reply

Who is online

Users browsing this forum: DollhouseRose, Google [Bot], LateWhiteRabbit, yozayozo