When I hover over a button I want it to dissolve in or fade in when I hover over it.
how to make a button hover transition? [Solved!]
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.
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
how to make a button hover transition? [Solved!]
Last edited by beastcarving on Tue Sep 03, 2019 5:32 am, edited 1 time in total.
Pulse Cage (full game) Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: how to make a button hover transition? [Help!]
Try thisbeastcarving wrote: ↑Sun Sep 01, 2019 6:10 pm When I hover over a button I want it to dissolve in or fade in when I hover over it.
viewtopic.php?t=45332#p462828
viewtopic.php?t=45332#p462828
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: how to make a button hover transition? [Help!]
You mean you want the image that appears when hovering near the play button to dissolve?beastcarving wrote: ↑Sun Sep 01, 2019 6:10 pm When I hover over a button I want it to dissolve in or fade in when I hover over it.
if the image appearing when hovering the button is shown using showif, you can use atl...
Code: Select all
transform img_dissolve:
on show:
alpha 0.0
easein 1.0 alpha 1.0
on hide:
easeout 1.0 alpha 0.0
screen main_menu:
....
default isShowable = False
showif isShowable:
add img_name at img_dissolve
textbutton _("Play") hovered ToggleScreenVariable("isShowable")
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: how to make a button hover transition? [Help!]
Code: Select all
transform img_dissolve:
on show:
alpha 0.0
easein 1.0 alpha 1.0
on hide:
easeout 1.0 alpha 0.0
screen main_menu:
default isShowable = False
showif isShowable:
add "idle_ybr.png" at img_dissolve
imagemap:
ground "ybrmenu.png"
idle "1ybrmb.png"
hotspot (0, 1, 521, 799) action ShowMenu ("avatar") hovered ToggleScreenVariable("isShowable")
hotspot (513, 626, 196, 78) action ShowMenu("loading")
hotspot (715, 595, 163, 160) action ShowMenu("options")
hotspot (1093, 613, 76, 71) action Quit(confirm=True)
init -2:
style mm_button:
size_group "mm"
Pulse Cage (full game) Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: how to make a button hover transition? [Help!]
you need to move the lines:
down under the imagemap.
the screens are rendered top to bottom and anything on top will appear behind the next lines
Code: Select all
showif isShowable:
add "idle_ybr.png" at img_dissolve
the screens are rendered top to bottom and anything on top will appear behind the next lines
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: how to make a button hover transition? [Help!]
Thanks it's perfect
Pulse Cage (full game) Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
Who is online
Users browsing this forum: Google [Bot]