How to center text in a textbutton [Duplicate]

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
oatnoodles
Regular
Posts: 71
Joined: Tue Aug 03, 2021 6:26 pm
Projects: Samuda Interval
Organization: Tomuwa Entertainment
Deviantart: oatnoodles
Github: oatnoodles
itch: oatnoodles
Discord: oatnoodles
Contact:

How to center text in a textbutton [Duplicate]

#1 Post by oatnoodles »

I've been replacing some of my imagebuttons with textbuttons, but I can't get the TEXT in the button centered. The button itself is placed and centered fine, but nowhere does xalign 0.5 work; at least where I've tried.

Current code:

Code: Select all

    vbox:
        spacing 24
        ypos 309

        #Inventory: (703, 309, 513, 88)
        textbutton "Inventory":
            xpos 703
            xminimum 513
            text_color "#414141"
            text_hover_color "#D1CCC9"
            action ShowMenu("inventory"), With(Dissolve(0.5))

Post Reply

Who is online

Users browsing this forum: No registered users