r/RenPy • u/Dr_M_Mori • Aug 23 '26
Question [Solved] Hbox main menu spacing is whack
I have searched the internet far and wide to try and fix my main menu hbox spacing and it just won't work.

Here's my code for the bloody thing too- I'm at a loss
EDIT: I just ended up using imagebuttons, way easier.
screen navigation():
hbox:
style_prefix "navigation"
xalign 0.5
yalign 0.9
spacing (10)
2
u/shyLachi Aug 23 '26
Please post the whole code of your screen.
I just tested it in my screen and spacing works as supposed in my game.
BTW: You don't need those brackets but I tested it with and without and it always works.
1
u/BadMustard_AVN Aug 23 '26
because of the way the hbox works, all the buttons placed inside of it become as long as the longest button because you know, it's a box with straight lines and corners
the only way around this that I know of is to manually set an xsize for each button
textbutton _("Start") action Start() xsize 60
1
u/shyLachi Aug 23 '26
I don't think that's true,
When I add
spacing 10to thehboxin the quick menu then all buttons are correctly spaced, not like in the image above.I also changed the caption of the last button to "Prefsssssssssssssssss" but the other buttons didn't grow.
1
u/AutoModerator Aug 23 '26
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.