This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes


I'm working on making an inventory using the grid container. So far it works and looks pretty nice but I've realized there isn't an obvious way to set the position of an object in a GridContainer? I'm creating instances of objects as TextureRects and making them children to the GridConatiner.

I've also tried to redo this with an ItemList instead of a grid. But this doesn't appear to have a signal for when the mouse enters an item. (I have custom tooltips that utilize this)

See here: (place holder sprites lol)


in Engine by (15 points)

1 Answer

+2 votes
Best answer

GridContainer contents are ordered by child order. You can use Node.add_child_below_node() when you add the item or Node.move_child() to rearrange.

by (22,191 points)
selected by

Oh, I see that points be in a better direction.

I suppose this would be pretty useful then:

getparent().movechild(self, index)

Thanks! :)

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 [email protected] with your username.