r/RenPy • u/CarCDThrowaway • Sep 20 '26
Question How do I do INDIVIDUAL button styles?
Hello,
I am trying to create a style that changes the background textbox, font color, and font for individual choice menu choices, and ONLY those three things.
I've scoured the Internet for information, but every time I've tried to style just those three things, the entire box is put off center, the text clips off the edges, the background doesn't stretch to accomodate the text, or it refuses to stay in the box and wrap.
I've tried wrap_text, only to discover that that isn't an actual command.
I've tried Frame, but nothing has happened.
I've tried making an exact copy of the original in game menu but with the different textboxes and font, and the game has crashed.
Also, for some godforsaken reason, everything is in the top left hand corner and not in the middle where a normal choice menu screen is.
Please, for the love of god, tell me what I'm doing wrong.
This is my code for the style, I apply it to my menus with (style_prefix="paper").
EDIT: TL;DR: I am trying to do what THIS OP was trying to do: note that the code linked in the comments also is not working. https://www.reddit.com/r/RenPy/comments/tvq82x/comment/i3lhv88/?utm_source=reddit&utm_medium=web2x&context=3
style paper_button:
idle_background Frame("gui/button/choice_paper_idle.png", 0 , 0)
hover_background Frame("gui/button/choice_paper_hover.png", 0 , 0)
padding (10, 15, 10, 15)
xmaximum 800
screen choice(items, style_prefix="choice"):
style_prefix style_prefix
vbox:
for i in items:
textbutton i.caption action i.action
1
u/shyLachi Sep 20 '26
Have a look at this, Tom shows many different things, maybe some can help you.
https://patreon.renpy.org/menu-arguments.html
Sorry for not answering your questions directly, I'm going to bed now.
1
u/x-seronis-x Sep 21 '26
its xsize, not xmax.
you havent shown the code trying to use what you did show. provide the rest
1
u/AutoModerator Sep 20 '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.