Why does a PopupPanel as a child of Button open in the corner of the screen?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dri
:warning: Old Version Published before Godot 3 was released.

Only after some trying I figured out that in this order the PopupPanel appears at the spot where I left it in the editor window.
enter image description here
I would be glad to be pointed to a good read about those node hierarchies and what has to be the parent of whom to get the expected results.

Popups draw relative to the anchor, when you reparent them, the position gets corrected but the anchor can mess up things a bit so you need to adjust it again (I wonder if this is a feature or a bug).

I guess a good tutorial is needed to explain those small details in the Control branch.

eons | 2016-12-15 19:01

:bust_in_silhouette: Reply From: Jatz

PopupPanel is a toplevel control, meaning it is not effected by its parent position or scale, and is a child in hierarchy alone (it still gets removed if its parent is removed)

Control nodes have the function set_as_toplevel(true) or something for this.

Thanks a ton for the clarification! I will keep the hierarchy in mind.

Dri | 2016-12-19 00:50