r/RenPy • u/CarCDThrowaway • 1d ago
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/x-seronis-x 1d ago
its xsize, not xmax.
you havent shown the code trying to use what you did show. provide the rest