Stopping interaction with other screens while 'say' is up

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.
Post Reply
Message
Author
tiliv
Newbie
Posts: 5
Joined: Fri Sep 11, 2015 5:45 pm
Contact:

Stopping interaction with other screens while 'say' is up

#1 Post by tiliv »

Having a bit of trouble trying to ask the right question, so redirect me if I appear to be thinking about this the wrong way.

I have a scrollable map viewport on the screen, using a "show screen" (not "call screen") and I control the hiding of that screen based on the kinds of interactions that take place. Some buttons on the map trigger actions that may or may not want to hide the screen.

For those actions that want to leave the map up and perhaps just use the 'say' mode to overlay some narration onto the screen, I have the problem of two screens competing for the attention of mouse clicks and such. Even though the say screen is on top, clicks seem to be captured by the viewport first, etc. Spacebar still advanced the text in the say screen, but otherwise it's not a very usable UI.

I haven't found any discussion about "suspending" a whole screen -- leaving it visible while disabling all ui interactions, so that the 'say' stuff can have full control while it's available.

I tried to tightly control how ui.interact() is used, but to me it seems that the say screen's ui.interact() is opening up the other map screen's interactions as well.

My other thought was perhaps to render a snapshot of the map as-is and display that while hiding the map screen, so that I avoid this problem altogether by faking the fact that the map is still showing. I'm not sure that this is a viable strategy, however. Composites seem to be more about layering specific images than it is about shoving a whole screen of layout language into a flattened non-live composite.

Have I missed anything important, or is this a gotcha of committing to use multiple screens?

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

Re: Stopping interaction with other screens while 'say' is u

#2 Post by orz »

I'm not sure if I have what you're wanting 100% correct in my head, but have you tried setting "modal True" whenever you call a Say screen on top of a viewport?

tiliv
Newbie
Posts: 5
Joined: Fri Sep 11, 2015 5:45 pm
Contact:

Re: Stopping interaction with other screens while 'say' is u

#3 Post by tiliv »

Ah, that does seem to go in the direction I'm imagining.

Although, modifying the say screen itself to always use 'modal True' has the effect of apparently blocking everything, including itself. I tried playing with the zorder some to make sure I wasn't dealing with strange layering. Even when the say screen is the only thing up, I can only interact with the quick menu along the bottom.

I'll look at the python behind it and see if I can find a way to leverage the setting.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], piinkpuddiin