+1 vote

I was following this tutorial on Youtube https://www.youtube.com/watch?v=PTt9v452BVw

and at some point he used an 'AcceptDialog'. However, I've noted it starts with the text aligned left. I'm still quite new to the engine, so I tried adding a theme and fiddling with some options, but I got lost and this frustrated me a lot.

It's something SO simple, and yet I can't find a simple way to do it...

in Engine by (26 points)

2 Answers

+1 vote
Best answer

You can't, I've checked the documentation and it can't be centered.

by (99 points)
selected by

Yeah, I saw it as well, but just needed some confirmation. Thank you!

+1 vote

You can from code:

extends AcceptDialog

func _ready():
    get_child(1).align = HALIGN_CENTER

The child-id might change though if you add children to the AcceptDialog yourself.

by (10,483 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.