gui component outside of the begingroup/endgroup its in?

so im currently coding a dropdown menu gui control. basically when a button is pressed, a box containing other buttons pops up underneath. the problem im having is that my menu is close to the bottom of its begingroup/endgroup, and when the box pops up the lower half is being cut off. is there any way to force the box to display outside the bounds of the begingroup/endgroup. also, I considered using a window to accomplish this, but the dropdown menu is its own class, and I want to avoid having to pass the x and y coordinates of the group.

Unfortunately, this is how it needs to be done (though you got to use Window only for solving the processing order bug).

You got to “pop-up” the list part to be drawn after all the other stuff on screen, because if not then the next control would be rendered on top of it (probably every system on the planet does it this way).

Just make a helper method allowing you to render stuff at the end of the rendering cycle, and render your popup list there.

Also check this great combobox tutorial (it doesn’t solve the popup part though):

https://www.youtube.com/watch?v=WfvjA8mullw