0 votes


I think the headline sums it up quite nicely.

I appreciate every answer :)

in Engine by (72 points)

Have you tried using a CenterContainer node? Try making the icon a child of the CenterContainer node, and see what happens. You can also try using a BoxContainer node, and using the set_alignment() method to center it.

Thanks for the reply. I have a Button and set an Icon for it (through Button Control Panel). CenterContainer and BoxContainer won't have any affect, since the icon is inside the button / part of the button itself.

1 Answer

0 votes

I don't think you can center button icon. If there is no text in the button, use TextureButton or TouchScreenButton instead.

by (606 points)
edited by

I have text in there too :/

I still think TextureButton or TouchScreenButton are your best options. You can use image editing software to put Icon and Text together, then export it as a single image.

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.