How to adopt GUI

normal state

decrease width and have:

problem: my gui going down((

This is because of your anchors. You can read up a bit about how to layout a gui in this forum post.

And also in the gui documentation here.

7 Likes

I have a similar problem.

I need this behavior for different screen sizes:


(you see six nodes: 1 yellow fullscreen node, 1 green panel node, 4 blue button’s nodes)

But I couldn’t achieve this behavior with any experiments with adjust, pivot and anchor.
Please, tell me how to solve this problem. If you know of course.

What problem do I mean?
Here is one:


As you can see, the fit and zoom options are not suitable.
Is it possible to get the correct behavior without using custom lua code for resizing nodes manually?

Could you please share you example project?

Yep, please share so that we can fiddle around with this as well.

In your picture you use 2 different scale type:
Variant 1 is fit option.
Variant 3 is zoom option.
The only way to achieve it without code is by using layouts.

You can create one layout for smaller sizes with fit on the root node, and another one for bigger sizes with zoom.
If you don’t want to use layouts than variant 3 should be your design size and fit option for the root node.


IMHO, I prefer to use fit (Using fit on green node) in such cases because then I can control the size of the main view (using zoom if you make variant 3 wider you will have UI for the half of the screen), but of course with a pivot point in South for the green node:
my_fav.zip (2.7 KB)

1 Like

Thank you very much.
Now it’s all clear.