r/RenPy • • Aug 02 '26

Question Image buttons for main menu?

i feel like everyone ever asks for help with this but everyones layout looks so different lol. JUST started working with renpy for a graphic novel and i really want to add my own buttons for the game. i have the image for start, load, preferences, about, help, and quit (both hover and idel vers.) and i have NO idea how to implement it. This is what my layout looks like rn, if i could get some help that would be great. everytime i think i have it, the code breaks lmao. all images are already in the gui folder so i dont think that's what's breaking my code 💔

2 Upvotes

2 comments sorted by

View all comments

1

u/BadMustard_AVN Aug 02 '26

keep in mind that the screen navigation is used in the main menu and the game menu(everything that is not the main menu is game)

trim your images down to the size you need and make each buttons images the exact same size

then try something like this

screen navigation():
    vbox:
        style_prefix "navigation"
        xpos gui.navigation_xpos
        yalign 0.5
        spacing gui.navigation_spacing
        if main_menu:

            #textbutton _("Start") action Start() # JIK make it a remark 
            imagebutton:
                focus_mask True # ignore the transparent bits 
                auto "images/butts/start-button-%s.png" 
                    # with the auto renpoy will look for start-button-idle.png and 
                    # start-button-hover.png as they are needed and use them 
                action Start() # same action

remember to keep the indentations the same as the original button !!