Page 1 of 1

Make text in choice menu button align left/horizontally fill?

Posted: Fri Aug 24, 2018 7:14 pm
by SuperbowserX
Image

How can I make the text align left so that the text fills up the entirety of the choice button (rather than just occupying the middle portion of it)?

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sat Aug 25, 2018 7:48 pm
by idka
Gui.rpy -> choice buttons section -> replace 0.5 with 0.0

Code: Select all

define gui.choice_button_text_xalign = 0.0

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 2:49 am
by SuperbowserX
Here's what that did:

Image

(For clarity, I did set the choice button width to 465; but even when I commented that line out the issue still persisted when the buttons were of default length.)

The align did work (the text is aligned now). The problem here isn't quite the align; it's the filling. The issue seems to be the percentage of the choice button that the text occupies.

https://www.renpy.org/doc/html/gui.html#choice-menus

{quote]By default, text is placed in the central 75% of these images.[/quote]

Unfortunately, the guide didn't specify how to change this percentage. Anyone have any clue?

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 3:57 am
by philat
Change the padding of choice_button.

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 3:57 am
by trooper6
I'd say go to the gui.rpy file and look up the gui.choice_button_borders line and change the Borders(100, 5, 100, 5) to not have so much left and right padding. Try Borders(5, 5, 5, 5).

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 3:57 am
by trooper6
Philat you ninja'd me! LOL

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 4:20 am
by philat
lol, to the minute too. Shame, you're much nicer than I am when explaining this stuff. ;)

Re: Make text in choice menu button align left/horizontally fill?

Posted: Sun Aug 26, 2018 4:27 am
by SuperbowserX
Image

Thank you both, Borders(5, 5, 5, 5) is exactly what I wanted :) <3