Transition/animation for default GUI items?
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.
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.
Transition/animation for default GUI items?
Is it possible to add transition/animation for the default GUI items? For example, choice buttons: I'd like to have my choice_idle_background.png to fade out and simultaneously choice_hover_background.png to fade in when user hovers over a choice button, and the gui.choice_button_text_idle_color to smoothly fade into gui.choice_button_text_hover_color, instead of the latter ones just immediately replacing the former ones. If this is possible, where and how it should be defined? I failed to find any mention of this in the documentation.
A dyslexic man walks into a bra.
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Transition/animation for default GUI items?
It is. But you need to do a little bit of workaround something like this in the screen.
Another way might be by this... Not tried this one though.
Code: Select all
screen something():
default hovered = False
button:
action NullAction()
hovered SetScreenVariable("hovered", True)
unhovered SetScreenVariable("hovered", False)
showif hovered:
add "hovered_image.png" at fader
else:
add "idle_image.png" at fader
text "Something"
transform fader:
on show:
alpha 0.0
easein 0.5 alpha 1.0
on hide:
easeout 0.5 alpha 0.0
Code: Select all
screen something():
button:
action NullAction()
hover_background "hovered_image"
background "idle_image"
text "Something"
image hovered_image:
"hovered_image.png" with dissolve
image idle_image:
"idle_image.png" with dissolve
Re: Transition/animation for default GUI items?
Ah, so basically I need to replace the default item with my own solution? Thank you, I'll try out what you suggested.
A dyslexic man walks into a bra.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]