How to hide main_menu when I open any other menu?

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
AnnieJuraski
Newbie
Posts: 7
Joined: Thu Mar 14, 2024 7:56 pm
Contact:

How to hide main_menu when I open any other menu?

#1 Post by AnnieJuraski »

As you can see in the print bellow, the main_menu keeps appearing when I open game_menu or any other menu. How to hide when I open any other menu?
Attachments
Capture.JPG
(139.62 KiB) Not downloaded yet

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: How to hide main_menu when I open any other menu?

#2 Post by jeffster »

The column with buttons for
Novo Jogo
Carregar
etc.
is actually "screen navigation".

If you want to remove or modify this column in your menu (sub)screens:

Open file "screens.rpy" in your "game" folder and look how screens are arranged there. (See "main_menu" and "game_menu").

Notice the line that says

Code: Select all

use navigation
In individual sub-screens, notice the lines that say "tag menu" and "use game_menu".
For example:

Code: Select all

screen about():

    tag menu
    #...
    use game_menu(_("About"), scroll="viewport"):
That's how "screen about" uses "screen game_menu", and that uses "screen navigation".

That's how that column appears in you screens like "Preferences".

You can try to comment out "use game_menu":

Code: Select all

    # use game_menu(_("About"), scroll="viewport"):
and either shift the rest of the screen definition by 4 spaces to the left (i.e. decrease the indentation by 1 level), or put something like "frame" instead of "use game_menu", so that the indentation could remain the same:

Code: Select all

screen about():
    tag menu
    #use game_menu(_("About"), scroll="viewport"):
    frame:
        style_prefix "about"
        vbox:
            label "[config.name!t]"
            text _("Version [config.version!t]\n")
            if gui.about:
                text "[gui.about!t]\n"

            text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]")
For more information and guidance on how to remove or modify "screen navigation", you can search this forum (or other sites) for "screen navigation".

It's a pretty regular topic of discussions.

Official documentation:
https://www.renpy.org/doc/html/screen_s ... navigation

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]