“gui-popup” is an unsorted bin, which means that they are drawn in the order in which they appear in the scene graph, in a depth-first traversal from top to bottom and then from left to right.
So, instead of specifying the sort order like that, perhaps you should try reparenting them in a different order.
The “fixed” bin on the other hand is a fixed bin, which means they are rendered in the fixed order as specified in the setBin call.
I try reparenting one again after parenting to other, but render order doesn’t change.
I’m also not sure how I can make nodes render on top of render2d by setting them to the “fixed” bin. When I print render2d.getBinDrawOrder() I get 0, as with any other node.
You can create a new bin by putting this line in your Config.prc file:
cull-bin my-popup 70 fixed
And then adding your stuff to ‘my-popup’.
But note that the binning only controls order within a particular scene graph. You can’t use binning to make things that you attach to render appear on top of things that you attach to render2d; if you want something to appear on top of objects in render2d, it either has to be attached to render2d, or to some other scene graph that renders on top of render2d.