Animating main menu navigation buttons

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
scarletthinks
Newbie
Posts: 6
Joined: Mon Aug 27, 2018 11:23 am
Contact:

Animating main menu navigation buttons

#1 Post by scarletthinks »

It's me again ;__;
I've been trying to animate my main menu buttons. They are not imagebuttons, but the standard textbuttons: as for now, the background changes when I hover because I've put a "navigation_idle_background.png" and a "navigation_hover_background.png" in the gui>buttons folder; however, I'd like the two images to change with an animation, like a dissolve effect. I've tried reading the documentation, but I really don't know where to start (for instance does it have to be done in the screens.rpy or the gui.rpy file?)

I've only come up with this, but as expected it doesn't work:

Code: Select all

transform textbutton:
    on hover:
        show "navigation_hover_background.png"
        with dissolve
        pause
Can somebody please help? Thank you in advance <___<

User avatar
Andredron
Miko-Class Veteran
Posts: 718
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Animating main menu navigation buttons

#2 Post by Andredron »

scarletthinks wrote: Tue Aug 28, 2018 4:20 pm It's me again ;__;
I've been trying to animate my main menu buttons. They are not imagebuttons, but the standard textbuttons: as for now, the background changes when I hover because I've put a "navigation_idle_background.png" and a "navigation_hover_background.png" in the gui>buttons folder; however, I'd like the two images to change with an animation, like a dissolve effect. I've tried reading the documentation, but I really don't know where to start (for instance does it have to be done in the screens.rpy or the gui.rpy file?)

I've only come up with this, but as expected it doesn't work:

Code: Select all

transform textbutton:
    on hover:
        show "navigation_hover_background.png"
        with dissolve
        pause
Can somebody please help? Thank you in advance <___<
Ty in transform create alfa 1.0 and alfa 0.0
and use in button "at"

textbutton "karri" at name_transform action Jump("kuh")

or look in my tutorial, section Трансформация (transform)

Post Reply

Who is online

Users browsing this forum: Google [Bot]