Text not filling horizontal space in choice buttons...
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.
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.
-
- Veteran
- Posts: 298
- Joined: Fri Apr 20, 2012 4:44 am
- Contact:
Text not filling horizontal space in choice buttons...
I've tried various formatting commands but can't find a fix (see attached.) Does anyone have any idea what I need to do? Cheers,
alwaysthesamebluesky.com
-
- Veteran
- Posts: 298
- Joined: Fri Apr 20, 2012 4:44 am
- Contact:
Re: Text not filling horizontal space in choice buttons...
Cheers but I've already got that set to 0.0 in the screengrabphilat wrote:Probably this: http://www.renpy.org/doc/html/style_pro ... text_align
alwaysthesamebluesky.com
Re: Text not filling horizontal space in choice buttons...
...which would make the text left-aligned. You want 0.5 for centered text.
Although I just realized that you could be asking why your text is wrapping lines. That, you'd have to show your code to tell. Probably some weirdness around the size of the container.
Although I just realized that you could be asking why your text is wrapping lines. That, you'd have to show your code to tell. Probably some weirdness around the size of the container.
-
- Veteran
- Posts: 298
- Joined: Fri Apr 20, 2012 4:44 am
- Contact:
Re: Text not filling horizontal space in choice buttons...
Yep, I want it to be left-aligned, just for the lines to reach the end of the box! Here's my code:
Cheers,
Code: Select all
screen choice:
window:
style "menu_window"
xalign 0.2
yalign 0.5
vbox:
style "menu"
spacing 2
for caption, action, chosen in items:
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
init -2 python:
config.narrator_menu = True
style.menu_window.set_parent(style.default)
style.menu_choice.set_parent(style.button_text)
style.menu_choice.clear()
style.menu_choice_button.set_parent(style.button)
style.menu_choice_button.xminimum = int(config.screen_width * 2.0)
style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)
style.menu_choice.size = 35
style.menu_choice.color = "#ffffffCC"
style.menu_choice.hover_color = "#ffffff"
style.menu_choice.xalign = 0.0
style.menu_choice.xmaximum = 5000
style.menu_choice_button.background = "#7e947080"
style.menu_choice_button.hover_background = "#7e9470CC"
style.menu_choice_button.ymargin = 20
alwaysthesamebluesky.com
-
- Regular
- Posts: 26
- Joined: Sun Feb 22, 2015 7:46 pm
- Contact:
Re: Text not filling horizontal space in choice buttons...
XD XD XD
Its fun. I didn't noticed at first.
style.menu_choice_button.xminimum = int(config.screen_width * 2.0)
style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)
The minimum is larger than the maximum. Try fix it.
Its fun. I didn't noticed at first.
style.menu_choice_button.xminimum = int(config.screen_width * 2.0)
style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)
The minimum is larger than the maximum. Try fix it.
-
- Veteran
- Posts: 298
- Joined: Fri Apr 20, 2012 4:44 am
- Contact:
Re: Text not filling horizontal space in choice buttons...
All working perfectly now, thank you. Sometimes you just need a second pair of eyesCupCakeComedy wrote:XD XD XD
Its fun. I didn't noticed at first.
style.menu_choice_button.xminimum = int(config.screen_width * 2.0)
style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)
The minimum is larger than the maximum. Try fix it.
alwaysthesamebluesky.com
Who is online
Users browsing this forum: Bing [Bot]