OLD CODE
Code: Select all
transform capture_data:
on show, replace:
xalign -1.0
easein_quint 1.5 xalign 0.0
on hide, replaced:
xalign 0.0
easeout_quint 1.5 xalign -1.0
screen icon1():
default show_icon1 = False
showif not show_icon1:
hbox:
frame:
xpos -800
background "gui/button/iconbox1.png"
text "Text and stuff."
imagebutton:
xpos -500 ypos 350
focus_mask True
idle "gui/button/icon_dazzi.png"
hover Transform ("gui/button/icon_dazzi.png", matrixcolor=BrightnessMatrix(-0.3))
action ToggleScreenVariable("show_icon1")
showif show_icon1:
hbox:
at capture_data
box_reverse True
frame:
xpos -250
background "gui/button/iconbox1.png"
text "Text and stuff."
imagebutton:
xpos 800 ypos 350
focus_mask True
idle "gui/button/icon_dazzi.png"
hover Transform ("gui/button/icon_dazzi.png", matrixcolor=BrightnessMatrix(-0.3))
action ToggleScreenVariable("show_icon1")
EDIT: New code, but sadly not working yet and not sure if this is the best way to do it, so I still need help.
Code: Select all
transform capture_start:
xalign -1.0
easein_quint 1.5 xalign 0.0
transform capture_finish:
xalign 0.0
easeout_quint 1.5 xalign -1.0
screen icon1():
default cd = "capture_start"
default show_icon0 = False
hbox:
at cd
frame:
xpos -800
background "gui/button/iconbox1.png"
text "Text and stuff."
imagebutton:
xpos -500 ypos 350
focus_mask True
idle "gui/button/icon_dazzi.png"
hover Transform ("gui/button/icon_dazzi.png", matrixcolor=BrightnessMatrix(-0.3))
if show_icon0 == False:
action [SetVariable ("cd", "capture_finish"), SetVariable ("show_icon0", True)]
else:
action [SetVariable ("cd", "capture_start"), SetVariable ("show_icon0", False)]