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.
Hello, I am currently working on several projects at the same time. Since my internet volume is limited I recently updated Renpy to 7.4.8.
Since then the hover effects on the image buttons don't work properly.
In the example below an image is zoomed out and back in. This also works the first time you point to it. But after a few more tries the "animation" of zooming is stuck. It takes about 3 seconds until it zooms in and out again. (Before the update it was correct).
Can anyone help me with this, is the script wrong?
Hi, after some searching I finally found the bug tracker on github. There this behavior was reported as a bug. Here is my working solution. Instead of 2 buttons just define a transform. Unfortunately I can't say if it works with complex transformations.
# images
image home_button:
"images/hud/home.png"
# transform
transform hover_button:
on hover:
linear .25 zoom 1.1
linear .25 zoom 1.0
repeat
on idle:
linear .25 zoom 1.0
# screen (which is called from a label in my case)
screen city_map_navi():
# Home Button
hbox xalign 0.045 yalign 0.71:
imagebutton at hover_button: # <- use transform "hover_button"
idle "home_button" # <- same image
hover "home_button" # <- same image
hover_sound "/audio/hover.wav"
hovered Show("tooltip_home_button")
unhovered Hide("tooltip_home_button")
action Play("sound","/audio/_click.wav"), Function(renpy.jump, label="home_button_check")
# Bar Button
...
Maybe this will be helpful for others who have the same problem.