Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
at say_transform # default say screen other than adding transform to window
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
screen test1():
add Solid("#000", xysize=(200,200)):
at say_transform
yalign 0.5
transform say_transform:
on show:
yoffset 200
linear 0.5 yoffset 0
on hide:
linear 0.5 yoffset 200
label start:
scene bg room
show screen test1()
e "You've created a new Ren'Py game."
window hide
hide screen test1
pause
e "Once you add a story, pictures, and music, you can release it to the world!"
- the on show event works normally for both the say screen and test1 screen
- on hide doesn't seem to fire at all when say screen is hidden with window hide
- on hide works normally for test1 screen
- (curiously, from other forum posts, it appears to work normally for some - perhaps a different version? I didn't test that far)
I assume this is because the say screen is shown/hidden with different mechanisms than custom screens, but this seems like a bug. I do note that hide "isn't triggered when the transform is eliminated via the scene statement or exiting the context it exists in, such as when exiting the game menu." (https://www.renpy.org/doc/html/atl.html#external-events ) but does that apply here? Or is there another event that's intended to be used with the say screen?