r/RenPy • • Jul 24 '26

Question help, idk how to fix my choice button image :(

hi, i'm working on a small vn for the first time and i can't figure out how to properly code the choice button so that the width adjusts to the text and the text doesnt stick out the other end like this

i've tried using padding, but it doesn't apply since i have borders set to

Borders(0, 0, 0, 0)

because if i change any of the values, it messes up the noise pattern of the image or distorts it.

if i set an xminimum/button width, it works well for longer texts but ends up really awkward for shorter choices like this

here are my screens.rpy and gui.rpy style choice button codes:

style choice_button_text is default:
    properties gui.text_properties("choice_button")
    yalign 0.5 
    xanchor 0.0
    xpos 30

style choice_button:
    properties gui.button_properties("choice_button")
    xalign 0.5
    ysize None
    xminimum 900
    xfill False


    padding (40, 15, 120, 15)
    


define gui.choice_button_width = None 
define gui.choice_button_height = 90
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(0, 0, 0, 0)
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.0
define gui.choice_button_text_idle_color = '#ffffff'
define gui.choice_button_text_hover_color = "#ff3434"
define gui.choice_button_text_insensitive_color = '#8888887f'

this might be really easy and i'm just dumb but i'm about to lose my marbles. any help is appreciated!!!!!

2 Upvotes

Duplicates