Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Sojan | |
Old Version | Published before Godot 3 was released. |
I was fiddling with making a 2d gui the other day, and I stumbled on this, I figured it’s pretty simple, but I can’t understand it. Basically when the window is resized, the layout remains the same, wich means that people with smaller screens could potentially not even see the boutons. Scince an image is worth a thousand words, here are two!
and whene the screen size changes the image is no longer centered:
After a little while, I managed to get it to work by putting everything in the anchor section to center, but also discovered other combinations seem to work. I realize this is probably really simple, but I don’t understand how it works. Why is the setting on the controle node, and not on the botoun, does this mean it will work for any gui object? Also, there are anchors on the actuall botoun node, what do these do? And how do the anchors work (wich anchor does what)? Anybody mind to explain how the anchor system works?