GUI Constraints for nodes of layout [SOLVED]

I don’t found information about it, I want that the distance between GUI nodes and ends of screen (for example, right and bottom) does not change.

I can do it in figma and lunacy with "Constraints" but here idk how.

VIdeo demo:

After record this video, I experimented with pivot of nodes but it still didn’t give me what I wanted.

You can use “achors” nodes (read here - How to GUI in Defold)

Add an empty node with stretch adjust mode to the right bottom corner and add as children this loading nodes with fit adjust mode

1 Like

It don’t work correctly when I trying to wide this. :sob:

ALSO I changed the pivot of root to South East

The anchor point should be exactly at the right bottom corner to fix your problem.

It calculates the percentage of where it is placed, and since there is an offset from the right, you get a bigger offset when the screen is wide.

1 Like

YES ! IT WORKS !!!
THANKS VERY MUCH !!

peter-ricemp4

4 Likes