Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
missiya4
- Newbie
- Posts: 6
- Joined: Fri Oct 22, 2021 11:18 am
-
Contact:
#1
Post
by missiya4 » Fri Jun 17, 2022 11:46 am
Hi all. Today I encountered a problem that "on hide" transform stops working for screen
menu elements that have at least one button or textbutton in them.
This happens when I need to exit the menu with the right mouse button or with Return().
Has anyone encountered this problem before?
Here's an example:
Code: Select all
transform show_hide_moves(diff_x=100):
on show:
xoffset diff_x
linear .3 xoffset 0
on hide:
xoffset 0
linear .2 xoffset -diff_x
screen test_screen():
tag menu
frame at show_hide_moves:
null # There may be text, images etc. Everything works well.
textbutton "1111" # But with any buttons/textbuttons/imagebuttons "on hide" stops working.
# Another screen...
# ...
textbutton "Open Test Menu" action [ShowMenu("test_screen")]
-
missiya4
- Newbie
- Posts: 6
- Joined: Fri Oct 22, 2021 11:18 am
-
Contact:
#3
Post
by missiya4 » Fri Jun 17, 2022 2:15 pm
I have no problem with the menu opening animation. There is nothing wrong with it.
I only have a problem with closing the menu (right-click or Return().
Tried your method, but it does not work fully.
At best, it leaves behind a completely opaque copy, which takes much longer to disappear than what moves in front of that copy.
Because of this, only a small wave effect is created, but the desired result is almost absent. The participation of alpha in the animation does not help either.

-
RicharDann
- Veteran
- Posts: 284
- Joined: Thu Aug 31, 2017 11:47 am
-
Contact:
#4
Post
by RicharDann » Fri Jun 17, 2022 3:26 pm
Your first post's example seems to be working for me on Ren'Py 7.4.2. Are you trying this on a newer version?
The most important step is always the next one.
-
missiya4
- Newbie
- Posts: 6
- Joined: Fri Oct 22, 2021 11:18 am
-
Contact:
#5
Post
by missiya4 » Sat Jun 18, 2022 5:28 am
RicharDann wrote: ↑Fri Jun 17, 2022 3:26 pm
Are you trying this on a newer version?
I have not yet been able to update Ren'Py for the sake of testing.
I just have a lot of manual engine fixes.
Can you try this example to be sure?
Code: Select all
transform show_hide_moves(diff_x=100):
on show:
xoffset diff_x
linear .3 xoffset 0
on hide:
xoffset 0
linear .2 xoffset -diff_x
screen test_screen():
tag menu
frame xysize(422,222) align(.5,.2) at show_hide_moves:
null
text "This frame should go to the left when the right mouse button is clicked.\nThat's OK."
frame xysize(422,222) align(.5,.7) at show_hide_moves:
null
text "This frame will NOT go to the left, but will simply disappear through transparency.\nBut that's wrong."
textbutton "Textbutton" align (.5,1.0)
# Another screen...
# ...
#textbutton "Open Test Menu" action [ShowMenu("test_screen")]
Normally, when you right click, both frames should go to the left before disappearing completely.
But if it happens the way it's written on them, it's wrong.
Thanks.
Users browsing this forum: Bing [Bot]