Displaying the Quick Menu Only When the Text Box Is Visible

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
Aiyuu
Regular
Posts: 28
Joined: Thu Aug 02, 2018 7:58 pm
Completed: Ovine Replica
Projects: Ovine Replica, Ursine Science
itch: amorous-ursidae
Contact:

Displaying the Quick Menu Only When the Text Box Is Visible

#1 Post by Aiyuu »

What I figured should have been a simple solution ended up being a bit more complicated than I expected, and I haven't been able to devise a solution since looking around for an answer, so I hope no one minds me starting a new thread on this.

In no time at all, I was able to get a custom quick menu working smoothly thanks to this thread:

viewtopic.php?f=8&t=15769

However, a separate issue arose from having succeeded with that. The quick menu I devised, while fancier than the default option, is far too garish to keep on the screen at all times. I've seen in my searching around on the matter that it's a simple enough task to manually hide the quick menu before important moments like displaying chapter titles and whatnot, but on the other hand, it would be a hassle to show and hide it before and after each section of dialogue that comes between transitions like a quick dissolve. That's my primary concern.

In short, what I need is a way to link the appearance of the quick menu to the text box so that the menu is hidden and only displayed in tandem with the box, ideally without a need to type out a command myself each time I also show or hide a new image. Alternatively, if it is possible to apply a map to the text box itself without separating the menu images from the text box image (which is the solution devised in the thread I linked), then suggestions for that would be just as appreciated, so long as that mitigates the problem.

Also, please keep in mind that I know essentially nothing about coding other than the basics necessary to use Ren'Py. I'm currently using version 6.99, which has had me encountering no shortage of outdated information in my frantic Google searches.

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: Displaying the Quick Menu Only When the Text Box Is Visible

#2 Post by Aiyuu »

As it turns out, I was able to resolve this issue on my own after a bit of experimentation, so I certainly feel foolish for having started this thread without even needing outside help. However, since I was able to reach a solution, I might as well share what I accomplished for anyone else with a similar issue.

I found this thread beforehand, but it wasn't particularly helpful to someone like me who has a minimal understanding of how coding works, let alone where to even copy and paste what I need:

viewtopic.php?t=40693

Removing the code specified was simple enough for me at first, but on the other hand, I struggled to find where exactly "the end of the say screen" is, seeing that posting it at the very end of that section in "screens.rpy" didn't do anything but bring up an error message when launching the game.

So then, if you're using a version of Ren'Py similar to 6.99, this will be the code you need to search for 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"

        use quick_menu
 
The very last line placed in that specific location is a new addition that ties the quick menu to the text box.

Then like the thread I linked mentions, the following two lines, also found in "screens.rpy", will be the only thing necessary to remove in order make everything function properly:

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
With all that said, I apologize for having asked a question only to solve it myself, but I do hope that what I learned on my own is at least useful to anyone else having as much unnecessary trouble with this as I did.

Post Reply

Who is online

Users browsing this forum: Google [Bot]