Hiding the Quick Menu During Narrator Dialogue

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
Zeekee
Regular
Posts: 67
Joined: Wed Jul 23, 2014 10:17 pm
Projects: No One But You, The Anomaly
Organization: Annexe Interactive
Skype: ytmnd111
Soundcloud: zomgaarh
Location: USAF Academy, CO
Contact:

Hiding the Quick Menu During Narrator Dialogue

#1 Post by Zeekee »

I'm trying to figure out how to best hide the Quick Menu while a certain character is speaking, but have had no luck. Here's the code I have for the character definition:

Code: Select all

define n = Character(None, window_background="images/GUI/Prologue_textbox_small.png", what_xalign=0.5, what_ypos=60, q_menu=False)
Here's my screen method:

Code: Select all

screen say(who, what, side_image=None, two_window=False, q_menu=True):

    # Decide if we want to use the one-window or two-window variant.
    if not two_window:

        # The one window variant.
        window:
            ypos 695
            id "window"

            has vbox:
                style "say_vbox"

            if who:
                text who id "who"

            text what id "what"

    else:

        # The two window variant.
        vbox:
            style "say_two_window_vbox"


            window:
                #ypos 282              
                id "window"

                has vbox:
                    style "say_vbox"

                text what id "what"
            
            if who:
                window:
                    #xpos 150
                    #ypos -85                    
                    style "say_who_window"

                    text who:
                        id "who"  

    # If there's a side image, display it above the text.
    if side_image:
        add side_image
    else:
        add SideImage() xalign 0.0 yalign 1.0

    # Use the quick menu.
    if q_menu:
        use quick_menu
I tried using q_menu with a default value of true to tell the game when and when not to display the menu, but it seems to appear no matter what. Any help would be much appreciated! :)
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau

philat
Eileen-Class Veteran
Posts: 1910
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Hiding the Quick Menu During Narrator Dialogue

#2 Post by philat »

Why not simply if who != None?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Hiding the Quick Menu During Narrator Dialogue

#3 Post by Remix »

Did you comment out the overlay quick menu?

screens.rpy -- line 436 or so:

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
Putting it in the say() screen without removing it from elsewhere would just ummm show it
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]