How to hide the navigation quick menu for a cutscene?

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
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

How to hide the navigation quick menu for a cutscene?

#1 Post by Mooneon »

I want to temporarily hide the navigation quick menu so in my game it would look like a cutscene. How do you do this?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: How to hide the navigation quick menu for a cutscene?

#2 Post by PyTom »

You basically need to make it conditional in the screens that use it.

First off, default a quick_menu variable so it has the condition.

Code: Select all

default show_quick_menu = True
Then you need to modify the quick menu.

Code: Select all

screen quick_menu():
    if quick_menu:
        # Add an in-game quick menu.
        hbox:
            style_group "quick"

            xalign 1.0
            yalign 1.0

            textbutton _("Back") action Rollback()
            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Skip") action Skip()
            textbutton _("F.Skip") action Skip(fast=True, confirm=True)
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            textbutton _("Prefs") action ShowMenu('preferences')
Then you can control the show_quick_menu variable to determin if it's shown.

Code: Select all

"Shown"
$ show_quick_menu = False
"Hidden"
$ show_quick_menu = True
"Shown"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Katy133
Miko-Class Veteran
Posts: 704
Joined: Sat Nov 16, 2013 1:21 pm
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Projects: The Butler Detective
Tumblr: katy-133
Deviantart: Katy133
Soundcloud: Katy133
itch: katy133
Location: Canada
Contact:

Re: How to hide the navigation quick menu for a cutscene?

#3 Post by Katy133 »

Just wanted to correct a small typo, since I'm using this as well:

Code: Select all

screen quick_menu():
    #edit under this line:
    if show_quick_menu:
        # Add an in-game quick menu.
        hbox:
            style_group "quick"

            xalign 1.0
            yalign 1.0

            textbutton _("Back") action Rollback()
            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Skip") action Skip()
            textbutton _("F.Skip") action Skip(fast=True, confirm=True)
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            textbutton _("Prefs") action ShowMenu('preferences')
ImageImage

My Website, which lists my visual novels.
Become a patron on my Patreon!

User avatar
Minuteman
Regular
Posts: 40
Joined: Sat Feb 24, 2018 2:02 pm
Location: On duty
Contact:

Re: How to hide the navigation quick menu for a cutscene?

#4 Post by Minuteman »

Hello
What if I use '$ quick_menu = False' to hide quick menu? Is this is alright?
of the people for the people

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to hide the navigation quick menu for a cutscene?

#5 Post by Imperf3kt »

If you are using a recent version of Ren'Py, yes, that is fine. The quick_menu variable is already defined within screens.rpy
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users