|Topic was automatically imported from the old Question2Answer platform.
The issue is that what button the mouse hovers over isn’t affected by the z-index value of it’s parent node2D and rather just based on the order of the scene tree (buttons drawn last in the scene are hovered over first). The button’s texture is affected by it’s parent’s z_index however, I find this misleading.
I was able to easily test this in a project with 2 node2D nodes with button nodes within them and setting the z_index of the node higher in the scene tree a higher value than the node below it:
any suggestions would be appreciated though I might just have to write a function which automatically resizes itself relative to other buttons.