how to make a button hover transition? [Solved!]
Posted: 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.
Supporting creators of visual novels and story-based games since 2003.
https://lemmasoft.renai.us/forums/
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.
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.
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")
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"
Code: Select all
showif isShowable:
add "idle_ybr.png" at img_dissolve