How to hide custom UI quick menu during screen transitions? [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
Desertopa
Regular
Posts: 28
Joined: Fri Aug 30, 2019 7:14 pm
Contact:

How to hide custom UI quick menu during screen transitions? [Solved]

#1 Post by Desertopa »

So, the game I'm working on recently received a full UI overhaul, finally graduating from an extremely long period with completely uncustomized UI. I'm really happy with how everything looks, except, unlike before when the game was using Ren'Py's uncustomized UI, the quick menu doesn't automatically disappear along with the dialogue box during screen transitions.

I can manually disable the quick menu during screen transitions to prevent it from causing visual disruption, but there are literally hundreds of screen transitions (counting both scene changes and CG changes) which I'd have to apply that to, and that's just for the demo.

So, is there any practical way to get the quick menu to automatically disappear during screen transitions again?
Last edited by Desertopa on Sun Oct 11, 2020 12:58 pm, edited 1 time in total.

afrikanwizard
Newbie
Posts: 21
Joined: Tue Nov 19, 2019 3:41 pm
Completed: Edge of Darkness - Volume 1: The Old Man
Contact:

Re: How to hide custom UI quick menu during screen transitions?

#2 Post by afrikanwizard »

I would like to know this myself as I had the same problem.

And I *really* don't like the design of the custom Ren'Py quickmenu to begin with, but I lack the skills to make and code a new one. :) I don't even know how manually disable the quickmenu for transitions, like you mention.


So my 'solution' was to disable the whole thing altogether with this simple line of code:

Code: Select all

    $ quick_menu = False

Of course, this means that someone reading my VN will have to right-click or press "Esc" to save, load or access the config menu. And 'quicksave' or 'quickload' aren't an option anymore.

It was not ideal but. IMHO, it was worth it for aesthetics' sake.

Desertopa
Regular
Posts: 28
Joined: Fri Aug 30, 2019 7:14 pm
Contact:

Re: How to hide custom UI quick menu during screen transitions?

#3 Post by Desertopa »

afrikanwizard wrote: Sun Oct 11, 2020 10:55 am

And I *really* don't like the design of the custom Ren'Py quickmenu to begin with, but I lack the skills to make and code a new one. :) I don't even know how manually disable the quickmenu for transitions, like you mention.


So my 'solution' was to disable the whole thing altogether with this simple line of code:

Code: Select all

    $ quick_menu = False
My method of manually disabling it for each transition is pretty much exactly what you already described, I just use that command when I initiate the screen transition, and revert it with "$ quick_menu = True" when the transition is done. I'd really rather not have to resort to using that for every screen transition in the entire game.

User avatar
Aiyuu
Regular
Posts: 28
Joined: Thu Aug 02, 2018 7:58 pm
Completed: Ovine Replica
Projects: Ovine Replica, Ursine Science
itch: amorous-ursidae
Contact:

Re: How to hide custom UI quick menu during screen transitions?

#4 Post by Aiyuu »

If I recall correctly from my own experience:

Find this section in "screens.rpy":

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                style "namebox"
                text who id "who"

        text what id "what"
 
Add a line that says "use quick_menu" to the end of the "window:" block.

Then look for this code in "screens.rpy" and erase it:

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
After you've done this, begin from a new save file from the start of the game to check it, since preexisting save files may contradict this update.

Desertopa
Regular
Posts: 28
Joined: Fri Aug 30, 2019 7:14 pm
Contact:

Re: How to hide custom UI quick menu during screen transitions?

#5 Post by Desertopa »

Aiyuu wrote: Sun Oct 11, 2020 11:49 am If I recall correctly from my own experience:

Find this section in "screens.rpy":

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                style "namebox"
                text who id "who"

        text what id "what"
 
Add a line that says "use quick_menu" to the end of the "window:" block.

Then look for this code in "screens.rpy" and erase it:

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
After you've done this, begin from a new save file from the start of the game to check it, since preexisting save files may contradict this update.

Okay, I might be messing up something obvious, but should the code section look like

Code: Select all

window:
        id "window"

        if who is not None:

            window:
                id "namebox"
                style "namebox"
                text who id "who"
                "use quick_menu"

        text what id "what"
        
?

Because when I try to run that, I get an error on that line, "expected a keyword argument or child statement."

Edit- Okay, I was making a stupid and obvious mistake, "use quick_menu" shouldn't have been in quotes in the actual code, and I stop getting an error when I remove them. But, when I implement this, it just removes the quickmenu entirely, rather than having it only show up when the text box does.

Desertopa
Regular
Posts: 28
Joined: Fri Aug 30, 2019 7:14 pm
Contact:

Re: How to hide custom UI quick menu during screen transitions?

#6 Post by Desertopa »

Okay, I was able to get in touch with a friend elsewhere who was able to help me resolve this. For future reference, the code works when it's formatted as-

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"
        

        if who is not None:

            window:
                id "namebox"
                style "namebox"
                text who id "who"
                

        text what id "what"
    use quick_menu
With the

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
section commented out.

Post Reply

Who is online

Users browsing this forum: No registered users