-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popup menu node not taking relative position #38171
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I second the issue. Both PopupMenu and PopupPanel don't use relative to parent position. Godot version: Godot Engine v3.2.3.stable.official Steps to reproduce:
Minimal reproduction project: popup_issue.zip |
As of 3/3/2021 this is still an issue. The PopupMenu node does not seem to inherent relative position from its parent. Godot Version: Godot Engine v3.2.3.stable.official I am able to work around it by making a function to set the inheritance manually in its parent: Scene:
Script attached to Node2D:
Alternatively, if you don't need to update the position every frame, you can put "popup.rect_global_position = self.position" right before you need to show the actual popup, assuming that behavior is controlled from the parent node. |
This is an annoying problem. I want the popup to popup, aside: popup() for vector2 parameter should be an issue, above the button, not over it. So, I worked out a solution that is dynamic to changing game window resolutions/resizing.
Feels like a hacky workaround, but it works for Godot 3.3.2! OS.get_window_safe_area() is a very useful function. which helped me solve many positioning problems in past projects. Probably should not be the go to function, but it is a fix to position vexing nodes like Popup and its derivatives. Layout button and container nodes are best for positioning gui. |
… fix for godot popup pos issue issue: godotengine/godot#38171 Fix is simple script to have the popup follow the actual button, it flickers so its not perfect but it works.
I'm having the same issue in 3.3.3 stable on macos |
This still does not seem to be solved. |
I also got this bug. This may or may not be helpful for the devs when debugging: I only started encountering this bug once I created a Window Further, the issue goes away if I set "Embed Subwindows" to true, but that won't work for my project. |
Note: This issue has been confirmed several times already. No need to confirm it further.
OS : Windows 10
Godot version : 3.2
Issue.zip
I attached popup menu as child node of a 2d node. I moved the parent node with which the popup menu node moved in the editor but on running it still shows it at previous position.
I think the popup menu relative position property is interpreted as absolute global position.
The text was updated successfully, but these errors were encountered: