Screen that blocks interaction with elements below [solved]

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
User avatar
LRH
Regular
Posts: 42
Joined: Mon May 19, 2014 10:59 am
Contact:

Screen that blocks interaction with elements below [solved]

#1 Post by LRH » Mon May 19, 2014 1:18 pm

I want to create a screen that blocks interaction with all elements below it, including conversations, menus and the like, until a button or hotspot on that screen is clicked to close it. I can figure out how to create and call a screen, but I'm having trouble finding out how to prevent interaction with all elements below it.
Last edited by LRH on Mon May 19, 2014 3:26 pm, edited 1 time in total.

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Screen that blocks interaction with elements below it

#2 Post by akemicchi » Mon May 19, 2014 1:49 pm

You'll need modal True on your screen.

Code: Select all

screen this_is_a_screen:
    modal True

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Screen that blocks interaction with elements below it

#3 Post by Alex » Mon May 19, 2014 1:53 pm

*too slow, but anyway*
You can set the "modal" parameter to your screen, so player could interact with this screen only.

Code: Select all

screen my_scr:
    modal True
    # all the stuff
http://www.renpy.org/doc/html/screens.h ... -statement

Or you could "call" your screen. In this case screen must return something when player would press a button or hotspot.
http://www.renpy.org/doc/html/screens.html#call-screen

User avatar
LRH
Regular
Posts: 42
Joined: Mon May 19, 2014 10:59 am
Contact:

Re: Screen that blocks interaction with elements below it

#4 Post by LRH » Mon May 19, 2014 3:26 pm

Thank you both very much for your solution :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]