Need help resizing a popupPanel in code

Godot Version 4.5

When the player clicks on a button, a popup appears. But right now it’s too small and since I’m working with pixel art, resizing it pixelizes it. I cant do it with a control node for that problem but I instanciate it via code. so im wondering if theres a way to do something like:

popup.resize = Vector2(2, 2)

thanks

1 Like

A Popup is a Window, so you can indeed do popup.size = Vector2i(2, 2)

Note that windows (and Control nodes) scale relative to their top-left corner, so to centre it you might want to call Window.popup_centered