+1 vote

Hello everyone!

I have a GridContainer where I add buttons to be placed as a grid. It works fine until there.

Then, I try to place some TextureFrames on top of each button like:
(every dot is a TextureFrame)
enter image description here

But instead of that, I get:

enter image description here

I wonder if is there any way to get the real position of the buttons after being placed by the GridContainer. I tried getpos and getglobal_pos but the result is the same.

One of the things I tried is create the buttons first and then iterate again to place the TextureFrames but nothing. The position is the same for everybutton.

Any help is appreciated, thank you in advance!

Edit: I discovered that the issue is I try to place TextureFrames before the GridContainer updates the position of the buttons.

in Engine by (86 points)
edited by

Please log in or register to answer this question.

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 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.