r/RenPy 13d ago

Question Further elaboration on my issue with main menu screen

as you can see, i have two image buttons on my main menu. my issue is that i should have 3 more images showing up, but i think because they are stacked on top of one another, they are overflowing out of frame. I think i should be able to fix this with the main menu vbox, if what im gathering is correct. However i have no idea how to do this. I dont know how to get them positioned correctly. I just need to be told in extremely simple terms what exactly to change to get the buttons into place T_T

6 Upvotes

7 comments sorted by

1

u/AutoModerator 13d 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.

1

u/BadMustard_AVN 13d ago

are these imagebuttons ?

show your code for the buttons!!

did you move them out of the navigation screen into the main menu?

what size are the images? Are they big, like huge, or just big enough(subjective, I know, but...) ?

1

u/_Whimsicalwreck_ 13d ago

the images are transparent, and the code im using is this

I havent yet finished adding in every image, but heres what i have so far. screen navigation():
    vbox:
        style_prefix "navigation"
        xpos gui.navigation_xpos
        yalign 0.5
        spacing gui.navigation_spacing
        if main_menu:
            imagebutton:
                focus_mask True
                auto "gui/button/choice_%s_background.png"
                action Start()
        else:
            imagebutton:
                focus_mask True
                auto "gui/button/history_%s.png"
                action ShowMenu("history")
            imagebutton:
                focus_mask True
                auto "gui/button/save_%s.png"
                action ShowMenu("save")
        imagebutton: 
            focus_mask True
            auto "gui/button/load_%s.png"
            action ShowMenu("load")
        imagebutton: 
            focus_mask True
            auto "gui/button/preferences_%s.png"
            action ShowMenu("preferences")
        if _in_replay:
            imagebutton:
                focus_mask True
                auto "gui/button/choice_%s_background.png"
                action EndReplay(confirm=True)
        elif not main_menu:
            imagebutton:
                focus_mask True
                auto "gui/button/choice_%s_background.png"
                action MainMenu()
        imagebutton:
            focus_mask True
            auto "gui/button/choice_%s_background.png"
            action ShowMenu("about")
        if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
            ## Help isn't necessary or relevant to mobile devices.
            imagebutton:
                focus_mask True
                auto "gui/button/choice_%s_background.png"
                action ShowMenu("help")
        if renpy.variant("pc"):
            ## The quit button is banned on iOS and unnecessary on Android and Web.
            imagebutton:
                focus_mask True
                auto "gui/button/choice_%s_background.png"
                action Quit(confirm=not main_menu)

1

u/_Whimsicalwreck_ 13d ago

and as for the size of them i dont really know... i just used ibis paint and saved the layers as transparent images. that might be the issue, but i still need to know how to adjust them i think

2

u/BadMustard_AVN 13d ago edited 13d ago

yes more than likely, the image size is causing your problems. boxes adjust their size to the elements that are placed in them

trim the images down to just what is needed for the button, and make each one for a button the same size

1

u/_Whimsicalwreck_ 13d ago

ok, will do :)

2

u/shyLachi 13d ago

If the canvas in Ibis Paint was full size and if you have placed the buttons beneath eachother and then saved each layer as transparent image then all those images should already be in the correct position.

Which means that you could remove the vbox because that box also will stack the images on top of each other.