Page 1 of 1

text_align in text buttons?

Posted: Sun Feb 20, 2011 6:41 am
by jack_norton
In python, it works, but when I tried to use it in screen language, like this:

Code: Select all

textbutton (sname) action Jump(slabel) text_style "maintxt" yminimum 200 xminimum 200 xalign .5 text_align .5
I got an error:

Code: Select all

On line 48 of C:\- indie dev -\games\renpy.new\Remember Me/game/simulator.rpy: u'text_align' is not a keyword argument or valid child for the textbutton statement.
textbutton (sname) action Jump(slabel) text_style "maintxt" yminimum 200 xminimum 200 xalign .5 text_align .5

Re: text_align in text buttons?

Posted: Sun Feb 20, 2011 6:45 am
by jack_norton
I noticed I was able to do this adding text_align in the style "maintxt", but not sure if that's the only right way to do this :)

Re: text_align in text buttons?

Posted: Mon Feb 21, 2011 10:27 pm
by PyTom
It shouldn't have worked in python. It was accepted, but didn't do anything. To do this in SL, you can't use a textbutton, you need to use a button with a text inside it.