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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
SuperbowserX
Veteran
Posts: 264
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

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

#1 Post by SuperbowserX » Fri Aug 24, 2018 7:14 pm

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)?

idka
Newbie
Posts: 6
Joined: Fri Jul 27, 2018 1:35 am
Contact:

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

#2 Post by idka » Sat Aug 25, 2018 7:48 pm

Gui.rpy -> choice buttons section -> replace 0.5 with 0.0

Code: Select all

define gui.choice_button_text_xalign = 0.0

User avatar
SuperbowserX
Veteran
Posts: 264
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

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

#3 Post by SuperbowserX » Sun Aug 26, 2018 2:49 am

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?

philat
Eileen-Class Veteran
Posts: 1647
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

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

#4 Post by philat » Sun Aug 26, 2018 3:57 am

Change the padding of choice_button.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3612
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

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

#5 Post by trooper6 » Sun Aug 26, 2018 3:57 am

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).
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
trooper6
Lemma-Class Veteran
Posts: 3612
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

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

#6 Post by trooper6 » Sun Aug 26, 2018 3:57 am

Philat you ninja'd me! LOL
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

philat
Eileen-Class Veteran
Posts: 1647
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

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

#7 Post by philat » Sun Aug 26, 2018 4:20 am

lol, to the minute too. Shame, you're much nicer than I am when explaining this stuff. ;)

User avatar
SuperbowserX
Veteran
Posts: 264
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

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

#8 Post by SuperbowserX » Sun Aug 26, 2018 4:27 am

Image

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

Post Reply

Who is online

Users browsing this forum: Exiscoming