for itemName in inventory:
print(itemName)
var item = inventoryItem.instance()
item.text = itemName
chestList.add_child(item)
print(chestList.get_children())
The nodes printed in the last row are the correct ones so they do get added but they’re not visible in the game. The script is tied to the position2d near the bottom of the main scene tree
This is the chestInterface scene tree
Heres the main scene tree. The chestInterface gets added as a child to the position2d near the bottom
Control nodes ( green ) do not inherit position of 2dNodes ( blue ). This is because Node2d uses position/global_position, while Control uses rect_position. You should manually do it like :
If You mean, that the control children of control parent are invisible, than You surely forgot to set minimal size of children. If it is 0, it will shrink to scale 0.
with “minimal size of children” do you mean the rect_min_size property? Because it says that if its set to (0, 0) then it’ll automatically scale to fit the children.
Nonken | 2022-08-05 14:12
nvn i solved it by copying my working player inventorys nodes dont know why it fixed it though
Nonken | 2022-08-05 16:11
Because it says that if its set to (0, 0) then it’ll automatically scale to fit the children.
That is only true when child control has behavior set to expand. And You don’t want that, because it would expand and take whole place