Page 1 of 1

Textbutton with two lines with different align. Is it possible?

Posted: Tue May 28, 2019 2:11 pm
by abeplaga
Hi everyone. I'm in trouble trying to do the title thing... Hope if you can help me (or if it's possible to do it).

I want to make a two line textbutton where the first line is aligned to the leftand the second line is aligned to the right, but I don't know how to do it! :oops:

I suppose it'll be something like this but obviously doesn't work.

Code: Select all

textbutton "LINE ONE\n{textalign=1.0}LINE TWO"
textbutton "LINE ONE\n{xalign=1.0}LINE TWO"
Maybe I'm asking an impossible but just in case I ask! Thank you all very much!

Re: Textbutton with two lines with different align. Is it possible?

Posted: Tue May 28, 2019 3:19 pm
by Imperf3kt
You can't do it like that.
Instead, make a container of some sort (I'd suggest a fixed) with xfill True, and place two textbutton inside it; one aligned left, one aligned right.
Then repeat it for further buttons.

Re: Textbutton with two lines with different align. Is it possible?

Posted: Tue May 28, 2019 3:37 pm
by Alex
Or try to put those text lines inside a button - https://www.renpy.org/doc/html/screens.html#button

Code: Select all

    button:
        align(0.5,0.15)
        idle_background gui.idle_color
        hover_background gui.hover_color
        vbox:
            xysize(200,200)
            text "Line 1" align(0.0, 0.2)
            text "Line 2" align(1.0, 0.8)
        action NullAction()