Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jluini |
If I’m not wrong, add_child adds a node in the last position of his parent. There’s an additional function add_child_below_node that allows adding a node after to another specific one, so you can add a node in index 1, index 2, index 3, etc… but never as first one.
-
Am I right?
-
How can I add a node at index zero, then?
-
Why there’s no function for adding at specific index? Or at least for adding above node so we can use it to add as first node. Maybe I should add an issue on this, but I’m surprised there’s no way to do such a simple thing and maybe there’s a reason for it (couldn’t find it tho)
Thanks!
In my case I want to do this for adding elements to a HBoxContainer in specific positions and could use a fixed empty node as first child as a workaround.
jluini | 2020-05-25 16:47