I'm having trouble trying to animate some elements of my say screen with transforms that use on show. Here is my say screen:
Code: Select all
screen say(who, what):
style_prefix "say"
frame:
background Frame("gui/divider.webp", 2, 0, tile = True) at dividercrop ## Might re-introduce this later. on show doesn't work, currently.
yoffset 1080
pos (199, -262)
xysize (1522, 2)
window:
id "window"
add Solid(gui.border_edge, xalign = 1.0, xoffset = 1, xysize = (1, 160))
text what id "what":
xpos 37
ypos 10
xsize 1195
line_spacing 4
size 31
window:
style "namebox"
add Solid(gui.border_edge, xpos = -1, xysize = (1, 60))
if who is not None:
text who + ":" id "who":
size 36
xpos 19
yalign 0.5
style say_window:
yanchor 1.0
pos (440, -80)
xysize (1280, 160)
yoffset 1080
background Solid(gui.box_background_color)
style namebox:
xpos -240
xysize (220, 60)
background Solid(gui.box_background_color)
Code: Select all
transform dividercrop:
crop_relative True
on hide:
crop (0, 0, 1, 1) alpha 1.0
ease gui.animspeed crop (0, 0, 0, 1) alpha 1.0
on show:
crop (0, 0, 0, 1) alpha 1.0
ease gui.animspeed crop (0, 0, 1, 1) alpha 1.0
As you can see, it works just fine whenever the box is hidden, but when it's re-shown - after a scene transition, for example - for whatever reason, the transform just isn't done. I've also tried it using on update instead of on show, and this is the result:
Does anybody know how I might be able to get this to work? I've a few other animations I want to implement into the say screen, and I would guess that they would all be affected by this problem.
Thanks!