"deactivate" screens (modal? z-order?)

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
Milkymalk
Miko-Class Veteran
Posts: 656
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

"deactivate" screens (modal? z-order?)

#1 Post by Milkymalk » Fri May 25, 2018 3:59 pm

Is there a way to deactivate a screen soaking input?

I have several screens as part of my permanent game interface with lots of buttons all over the place. When I run regular Ren'Py script, it doesn't advance when I click on a button (as to be expected). I tried showing an empty screen with "modal" to block the other screens, but that also prevents the dialogue from advancing. Adjusting the z-order of the "say" screen and the modal screen didn't solve that (I tried it because "modal" says that it blocks all interaction with screens below).

The reason is that while I want those screens to be visible all the time, I only want the player to interact with them while a certain other screen is "called" and no Ren'Py script is executing.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
trooper6
Lemma-Class Veteran
Posts: 3207
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: "deactivate" screens (modal? z-order?)

#2 Post by trooper6 » Fri May 25, 2018 4:12 pm

Why don’t you use SensitiveIf on your buttons, keyed to the result of a renpy.get_screen() call for whatever screen you want to be visible for the other screens to work?
A Close Shave:
*Last Thing Done (Jul 7) Finished Emotion Matrix for Joint Customer Sprite.
*Currently Doing: Print Matrices, & decide emotions to use for Joint Sprite, think about blinking and lip flap. Maybe also about TransitionConditionSwitch?
*First Next thing to do: Code in all the sprite emotion and camera movement for Close Shave Sprite Sections
*Next Thing to Do: Code in all CG and special animation stuff
*Other Next Thing: Do SFX
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
Milkymalk
Miko-Class Veteran
Posts: 656
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: "deactivate" screens (modal? z-order?)

#3 Post by Milkymalk » Fri May 25, 2018 4:18 pm

See, this is why I don't answer to problems in this forum as much as I should considering how long I have been around: There is so much stuff that I still have no idea exists :D

Thank you!

Although I'm wondering why z-order isn't able to put the say screen above the modal screen... If I put the modal screen on zorder -1, the other screens with zorder 0 (default) still work (but not the say screen). But the reason is probably that the clicks are not caught by the say screen itself, but rather processed only if no other screen takes it.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

kivik
Miko-Class Veteran
Posts: 730
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: "deactivate" screens (modal? z-order?)

#4 Post by kivik » Fri May 25, 2018 7:15 pm

Yeah making your buttons insensitive may be one way around this, but it feels like you're complicating things for yourself by making your buttons visible when they're not clickable - which is bad UX design. That said, the insensitive button approach will prevent the bad UX by showing that the button can't be clicked.

I personally prefer to call a screen that "use" other screens containing the buttons, so depending on the nature of the interaction I can control what button sets are visible. It saves you having to add the SensitiveIf clause to every single button on your screen - but then I have relatively large number of buttons so it may not be as big an issue for you?

User avatar
Milkymalk
Miko-Class Veteran
Posts: 656
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: "deactivate" screens (modal? z-order?)

#5 Post by Milkymalk » Fri May 25, 2018 9:15 pm

The game is not a typical visual novel. Instead of having narration and putting interfaces over them when needed, it has gameplay using the interfaces and puts narration over them when needed. That's why hiding the screens/buttons is not the way I want to do it.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: No registered users