This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

I have recently been diving into Godot's UI. I have found nearly everything I would need supported through nodes, apart from one thing:

I want to create a UI panel, in game, that allows the player to rescale it horizontally or vertically, to their desired height/width.

Basically as any Windows application can be resized, or in the way that Hsplit/Vsplit work, but then at the edges of a window. Someone asked this before a few months ago, and had some great visual examples: Create Resizable Window - Godot Q&A

Is something like this support natively through Godot, or would I have to make this myself (through collision boxes & Gscript). And if so, does anyone have any suggestions on how to tackle this?

Thanks in advance!

in Engine by (42 points)

1 Answer

+2 votes
Best answer

The Godot editor itself is made with the same nodes you can use in a game. Some of the windows in here are resizeable, so it's definitely possible to make a resizeable panel.

The built-in way is to use the WindowDialog class, which has a resizeable flag out of the box. If the title bar annoys you, you can re-style it by changing the styleboxes in the inspector.

by (29,510 points)
selected by

I cannot believe that I missed that one. Thanks a bunch!
I'll go experiment with it, and see if I can modify it to my needs!

if you have problem with that X button for closing that remains after removing bar - I used this :


to ged rid of it.

Rafiz, don't do this. It will make the node leak and it's not guaranteed to always be the first child in future versions.

To turn it off, you could do this instead:


Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.