xmaximum not working for choice buttons

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: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

xmaximum not working for choice buttons

#1 Post by SuperbowserX » Tue May 02, 2017 12:23 am

image: http://i.imgur.com/I9g8YIh.png

I am using 480px (width) images in my game. Problem is, when I have quite a few choices, they can end up going beyond the image parameters as shown in the image (and when there are more than 2-3, they might end up overlapping on to the character). Even when they don't, the blue bar that shows up when the mouse is held over a choice extends beyond the image into the blackish screen.

I attempted to change this by posting "xmaximum 480" under "style choice_vbox" but that did nothing.

Relative to the image I provided, here is a mockup of what I'd like:

http://i.imgur.com/TR3HpCF.png

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: xmaximum not working for choice buttons

#2 Post by indoneko » Tue May 02, 2017 1:26 am

Try adding this line in your gui.rpy (and change the value to fit your needs)

define gui.choice_button_width = 480
My avatar is courtesy of Mellanthe

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

Re: xmaximum not working for choice buttons

#3 Post by SuperbowserX » Wed May 03, 2017 1:19 am

Thanks! 480 isn't the exact number because the bar fades out towards the edge, but it's enough for me to work with it! (And for anyone else reading this thread in the future, you can also do what I might do and just change the image you see in game/gui/button).

Post Reply

Who is online

Users browsing this forum: Bing [Bot], EightiesOne