Page 1 of 1

When does a window disappear in transitions?

Posted: Thu Nov 07, 2013 8:26 am
by akakyouryuu
I searched renpy/display/core.py for the code which disappear a window in transitions.
I thought it was in Interface.interact(), but I couldn't find it.

Which code disappear a window in transitions?

Re: When does a window disappear in transitions?

Posted: Thu Nov 07, 2013 9:04 am
by PyTom
In modern Ren'Py, window disappearance is due to the say screen being shown with transient=True. When a screen is transient, it's removed at the end of the current interaction. (See, in renpy.display.core, the additional_transient list, the replace_transient method, and the transient flag to add().)

What are you trying to do?

Re: When does a window disappear in transitions?

Posted: Fri Nov 08, 2013 1:50 am
by akakyouryuu
I am thinking about showing a window during transitions without _window_during_transitions.
It doesn't support the nvl mode.

Re: When does a window disappear in transitions?

Posted: Fri Nov 08, 2013 2:11 am
by PyTom
Isn't window show the right way to do that, especially for nvl mode?

Re: When does a window disappear in transitions?

Posted: Sat Nov 09, 2013 10:39 pm
by akakyouryuu
I would like to allow a user to change whether showing window during transitions.
It seems important, expecially for like nvl mode.

Re: When does a window disappear in transitions?

Posted: Sun Nov 10, 2013 12:21 am
by PyTom
Do you mean a player, or a creator?

Re: When does a window disappear in transitions?

Posted: Sun Nov 10, 2013 12:25 am
by akakyouryuu
A player.

Re: When does a window disappear in transitions?

Posted: Sun Nov 10, 2013 12:33 am
by PyTom
I'd suggest adding a new preference for this.

You'll want to check it in 3 places. The window is shown in _default_empty_window, which is in renpy/common/00library.rpy - just bail out of that function early if appropriate. You'll also want to check the preferences in execute_window_show and execute_window_hide, both in renpy/common/00statements.rpy, so that the window transition doesn't run if the preferences is false.

Re: When does a window disappear in transitions?

Posted: Tue Nov 12, 2013 7:13 am
by akakyouryuu
I made this like below.
https://github.com/kyouryuukunn/renpy/c ... ing_trans3

I added window statements the window auto statement.
Showing the window is dependent on _preferences.during_trans If this is used.

If _preferences.during_trans is set to "window" and the window auto statement is used, the window is shown during transitions.
If _preferences.during_trans is set to "string" and the window auto statement is used, text is also shown during transitions.
If _preferences.during_trans is set to False and the window auto statement is used, it is the same that the window hide statement is used.

And the window is hidden automatically when the scene statement is used even if the window auto statement is used.
I'd like to pull request this. OK?

Re: When does a window disappear in transitions?

Posted: Tue Nov 12, 2013 1:35 pm
by PyTom
Can you pull-request it, just because that makes it easier for me to look at it?

Re: When does a window disappear in transitions?

Posted: Tue Nov 12, 2013 1:42 pm
by akakyouryuu
OK.