When does a window disappear in transitions?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

When does a window disappear in transitions?

#1 Post by akakyouryuu » Thu Nov 07, 2013 8:26 am

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?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When does a window disappear in transitions?

#2 Post by PyTom » Thu Nov 07, 2013 9:04 am

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?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: When does a window disappear in transitions?

#3 Post by akakyouryuu » Fri Nov 08, 2013 1:50 am

I am thinking about showing a window during transitions without _window_during_transitions.
It doesn't support the nvl mode.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When does a window disappear in transitions?

#4 Post by PyTom » Fri Nov 08, 2013 2:11 am

Isn't window show the right way to do that, especially for nvl mode?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: When does a window disappear in transitions?

#5 Post by akakyouryuu » Sat Nov 09, 2013 10:39 pm

I would like to allow a user to change whether showing window during transitions.
It seems important, expecially for like nvl mode.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When does a window disappear in transitions?

#6 Post by PyTom » Sun Nov 10, 2013 12:21 am

Do you mean a player, or a creator?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: When does a window disappear in transitions?

#7 Post by akakyouryuu » Sun Nov 10, 2013 12:25 am

A player.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When does a window disappear in transitions?

#8 Post by PyTom » Sun Nov 10, 2013 12:33 am

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: When does a window disappear in transitions?

#9 Post by akakyouryuu » Tue Nov 12, 2013 7:13 am

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?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When does a window disappear in transitions?

#10 Post by PyTom » Tue Nov 12, 2013 1:35 pm

Can you pull-request it, just because that makes it easier for me to look at it?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: When does a window disappear in transitions?

#11 Post by akakyouryuu » Tue Nov 12, 2013 1:42 pm

OK.

Post Reply

Who is online

Users browsing this forum: No registered users