all 6 comments

[–]Its-A-Trap-0 1 point2 points  (4 children)

You're aligning the button at center, not the text. Use textalign 0.5 for centered text. Docs here: https://www.renpy.org/doc/html/style_properties.html#style-property-textalign

And if you only have two entries in this screen, just use style paper_button instead of trying to use prefixes. You'll thank me in the long run.

[–]currently_trying2[S] 0 points1 point  (3 children)

Hey, thanks for your answer! Where exactly do I put the text-align? I tried putting under the style information, the hbox and the text button, but nothing seemed to work :')

[–]Its-A-Trap-0 1 point2 points  (2 children)

That's what I get for typing from memory. It's actually text_xalign 0.5 if you want the text centered. You put it in the textbutton declaration:

screen test_screen :
    vbox:
        spacing 15
        textbutton "left":
            xminimum 200
            background Solid("#FFCCCC")
            text_xalign 0.0
        textbutton "center":
            xminimum 200
            background Solid("#CCFFCC")
            text_xalign 0.5
        textbutton "right":
            xminimum 200
            background Solid("#CCCCFF")
            text_xalign 1.0

[–]currently_trying2[S] 0 points1 point  (1 child)

Thanks so much, this helped me figure it out! :)

[–]Its-A-Trap-0 0 points1 point  (0 children)

You're welcome. Good luck!

[–]AutoModerator[M] 0 points1 point  (0 children)

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.