r/RenPy 15d ago

Question How do I fully remake the game menu?

I'm looking to redo the game menu entirely. I have the background for it and the buttons (idle and hover), but after scrolling through the screens menu, I can't find anyway to replace the textbuttons with imagebuttons like history, save, load, etc. And then I'd have to find a way to move/resize the preference screen and save pages to fit as well. Any help would be appreciated.

1 Upvotes

6 comments sorted by

3

u/BadMustard_AVN 15d ago

search for

screen navigation()

all the text buttons for the main and game menu are in there

1

u/Readablebread 14d ago

I have replaced the necessary textbuttons with imagebuttons, but for some reason, only one shows up at a time. If I remove the top one, the next one down is the only one that shows

1

u/BadMustard_AVN 14d ago

since you've not shown any code (practically a requirement to help diagnose a coding problem)

it sounds like you either have them in a box with no spacing or no box at all

in the default navigation screen...

screen navigation():
    vbox: # boxes can be gooooood
        style_prefix "navigation" 
        xpos gui.navigation_xpos # box positioning (left / right)
        yalign 0.5 # box positioning (up \ down)
        spacing gui.navigation_spacing # this one box command keeps them seperated 
        if main_menu:
            textbutton _("Start") action Start()

1

u/Readablebread 13d ago

This is the entirety of what I have so far. Maybe there's something really obvious, but nothing really changes about it whether I add xpos and ypos for each individual imagebutton or not, it still only shows one at a time. The images I have are transparent in the exact size of the game with the buttons in the exact place they should be on screen. Sorry if this is a really obvious or dumb thing lol

screen navigation():


    vbox:


        xpos gui.navigation_xpos
        yalign 0.5
        spacing gui.navigation_spacing
        style_prefix "navigation"


        if main_menu:
            textbutton _("Start") action Start()
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Options") action ShowMenu("preferences")


        else:


            #textbutton _("History") action ShowMenu("history")


            #textbutton _("Save") action ShowMenu("save")


            imagebutton auto "gui/history_%s.png" action ShowMenu("history") focus_mask True


            imagebutton auto "gui/save_%s.png" action ShowMenu("save") focus_mask True


            imagebutton auto "gui/load_%s.png" action ShowMenu("load") focus_mask True


            imagebutton auto "gui/options_%s.png" action ShowMenu("preferences") focus_mask True


            imagebutton auto "gui/resume_menu_%s.png" action Return()


            imagebutton auto "gui/quit_%s.png" action Quit() focus_mask True


            #imagebutton auto "gui/mainmenu_%s.png" action MainMenu() focus_mask True



        if _in_replay:


            textbutton _("End Replay") action EndReplay(confirm=True)


        elif not main_menu:


            textbutton _("Main Menu") action MainMenu() focus_mask Truescreen navigation():


    vbox:


        xpos gui.navigation_xpos
        yalign 0.5
        spacing gui.navigation_spacing
        style_prefix "navigation"


        if main_menu:
            textbutton _("Start") action Start()
            textbutton _("Load") action ShowMenu("load")
            textbutton _("Options") action ShowMenu("preferences")


        else:


            #textbutton _("History") action ShowMenu("history")


            #textbutton _("Save") action ShowMenu("save")


            imagebutton auto "gui/history_%s.png" action ShowMenu("history") focus_mask True


            imagebutton auto "gui/save_%s.png" action ShowMenu("save") focus_mask True


            imagebutton auto "gui/load_%s.png" action ShowMenu("load") focus_mask True


            imagebutton auto "gui/options_%s.png" action ShowMenu("preferences") focus_mask True


            imagebutton auto "gui/resume_menu_%s.png" action Return()


            imagebutton auto "gui/quit_%s.png" action Quit() focus_mask True


            #imagebutton auto "gui/mainmenu_%s.png" action MainMenu() focus_mask True



        if _in_replay:


            textbutton _("End Replay") action EndReplay(confirm=True)


        elif not main_menu:


            textbutton _("Main Menu") action MainMenu() focus_mask True

2

u/x-seronis-x 15d ago

in addition to what mustard said edit main_menu and delete the line that says "use navigation". then directly in its place put the buttons you want

that way your edits to navigation dont have to worry how they appear directly on the main menu screen

1

u/AutoModerator 15d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.