RenPy Main Page Textbuttons

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
Hi All

I found where the Main page and main menu textbuttons are but I just cannot find a way to hide some of the menu items on my Main Page. If i hide for instance About then it's hidden for all the other menu pages.

Ideas?
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
if you want to show an entry only in the game menu and not in the main menu..
Code:
        if not main_menu:

            textbutton _("About") action ShowMenu("about")
 

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
I want to limit the options in the menu when you start up the game. The Main menu that is. I just want "Start/Load/Quit" to appear. The rest like "Preferences/Help/About/Load/Quit" this must appear only on the other menu pages like game page or help page or preferences page etc...

SO for the first ever page you would see, Main Menu then it should be example below?
how do i hide the other options?

Code:
        if  main_menu:

            textbutton _("Start") action ShowMenu("start")
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Quit") action ShowMenu("quit")

if you want to show an entry only in the game menu and not in the main menu..
Code:
        if not main_menu:

            textbutton _("About") action ShowMenu("about")
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
the standard renpy menu would be like this
Code:
        if  main_menu:
            textbutton _("Start") action Start()
        else:
            textbutton _("History") action ShowMenu("history")
            textbutton _("Save") action ShowMenu("save")

        textbutton _("Load") action ShowMenu("load")

        if  not main_menu:
            textbutton _("Preferences") action ShowMenu("preferences")

        if _in_replay:
            textbutton _("End Replay") action EndReplay(confirm=True)
        elif not main_menu:
            textbutton _("Main Menu") action MainMenu()
            textbutton _("About") action ShowMenu("about")
            textbutton _("Help") action ShowMenu("help")

        textbutton _("Quit") action Quit(confirm=not main_menu)
 

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
That looks like it yes, ive tried to hide or remove the options i do not need on my main page but without success. Like i said i only want it to be not visible / removed from my Main Page and not the other pages. What do i take out?

the standard renpy menu would be like this
Code:
        if  main_menu:
            textbutton _("Start") action Start()
        else:
            textbutton _("History") action ShowMenu("history")
            textbutton _("Save") action ShowMenu("save")

        textbutton _("Load") action ShowMenu("load")

        if  not main_menu:
            textbutton _("Preferences") action ShowMenu("preferences")

        if _in_replay:
            textbutton _("End Replay") action EndReplay(confirm=True)
        elif not main_menu:
            textbutton _("Main Menu") action MainMenu()
            textbutton _("About") action ShowMenu("about")
            textbutton _("Help") action ShowMenu("help")

        textbutton _("Quit") action Quit(confirm=not main_menu)
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
with the code above you have only start, load and quit in main menu
the normal game menu has all entries besides start
i thought, that was what you wanted
 

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
Yes it's what I wanted thank you. I misunderstood you. I thought you said the default code is what you supplied...

But then i had a look at it and i can see Load/Start/Quit are all in the main menu field and not part of "else or elif"

I'll enter this tonight in my RenPy code and have a look..thx again

with the code above you have only start, load and quit in main menu
the normal game menu has all entries besides start
i thought, that was what you wanted
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
Yes it's what I wanted thank you. I misunderstood you. I thought you said the default code is what you supplied...

But then i had a look at it and i can see Load/Start/Quit are all in the main menu field and not part of "else or elif"

I'll enter this tonight in my RenPy code and have a look..thx again
you're welcome. and yes, i have the tendency, to confuse people :closedeyesmile:
 

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
confucius says what ... hahahahaha :rolleyes:

EDIT: It does as you specified, great. ONLY teeney weeney problem is when you press on Load the first time it only shows the three options. Once in game and you right click to get the menu options again then all the menu options are there.

It's something small but people may want to go to preferences or help or such in the beginning or when they start up the game.

you're welcome. and yes, i have the tendency, to confuse people :closedeyesmile:
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
confucius says what ... hahahahaha :rolleyes:

EDIT: It does as you specified, great. ONLY teeney weeney problem is when you press on Load the first time it only shows the three options. Once in game and you right click to get the menu options again then all the menu options are there.

It's something small but people may want to go to preferences or help or such in the beginning or when they start up the game.
create 2 navigation screens..
You don't have permission to view the spoiler content. Log in or register now.
..and call them accordingly
You don't have permission to view the spoiler content. Log in or register now.
 

Deleted member 167032

Alternate Existence
Donor
Game Developer
Aug 16, 2017
2,719
4,931
Thx again @the66

What is the best way to learn Python as you clearly are pretty good with it?
I can see what you've been doing wrt the coding, just wondering how you learned to do it?
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,629
23,653
:) this is not python, just some renpy lines arranged in the right order
i suggest, learning by doing
and look into other's code
try to find out, what the coder wants to achieve and why he uses this exactly code
and have a tab with and open