Returning to Main Menu from Settings

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
dvcaputo
Newbie
Posts: 8
Joined: Mon Mar 09, 2015 11:07 am
Tumblr: d-video.tumblr.com
Soundcloud: d-video
Contact:

Returning to Main Menu from Settings

#1 Post by dvcaputo » Tue May 26, 2015 5:36 pm

Hi!
Kinda new here -- pleased to meet ya! ^_^

I was wondering something -- is there any way I can not have "Main Menu" grayed out when going to the Preferences from the Main Menu? It would be nice to return to the main menu in order to start a new game.

Thanks!
-D.V.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Returning to Main Menu from Settings

#2 Post by PyTom » Tue May 26, 2015 6:02 pm

You could always modify the navigation screen to be something like:

Code: Select all

screen navigation():

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    frame:
        style_group "gm_nav"
        xalign .98
        yalign .98

        has vbox

        textbutton _("Return") action Return()
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Save Game") action ShowMenu("save")
        textbutton _("Load Game") action ShowMenu("load")
        if main_menu:
            textbutton _("Main Menu") action Return()
        else:
            textbutton _("Main Menu") action MainMenu()
        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit()
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
dvcaputo
Newbie
Posts: 8
Joined: Mon Mar 09, 2015 11:07 am
Tumblr: d-video.tumblr.com
Soundcloud: d-video
Contact:

Re: Returning to Main Menu from Settings

#3 Post by dvcaputo » Thu Jun 11, 2015 6:15 am

Wow, thanks! (sorry this reply took so long ^_^;)

Post Reply

Who is online

Users browsing this forum: No registered users