mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.5K
active users

Nico | Ancient Mind out now!

Wouldn't it be nice if had one single Container node with properties like margin (top, bottom, left, right), orientation (vertical, horizontal), center (boolean), etc., instead of having so many container nodes?

The MarginContainer is probably the biggest hassle. Why do I have to add an extra node every time I want to add padding to an image or text?

You want a centered list? First you need a center container, then a margin container, then a NinePatchRect for the background, then ANOTHER margin container, then a VBox container (which you can't make horizontal on demand), then the label nodes.

@HexagonNico And then you remember - the more nodes are currently in the game , the lower the performance.

@HexagonNico Godot needs its own version of CSS and its box model, or maybe a syntax like QT. It can absolutely be easier than this.

@HexagonNico IDK would it solve it, but there is Stylebox resource you should be able to assin to most gui, it might solve your problem, also you can add theme resource to top level node to auto assign styles for child nodes

@HexagonNico Isn't there a way you can roll your own by creating a parent with a script which has four margin node references? I get what you're saying though. Just thinking about a stop-gap solution. In a similar vein, a handy node type for 2D sprite masks generated a lot of discussion on Godot's github: github.com/godotengine/godot-p

Describe the project you are working on This applies to all 2D projects I have worked on in the last 3,5 years, so ever since I started working with Godot. Describe the problem or limitation you ar...
GitHubAdd a "Mask2D" node (and/or a "mask_parent" property for Sprite2D) · Issue #4282 · godotengine/godot-proposalsBy golddotasksquestions

@HexagonNico I tried to implement the DockPanel from wpf in the past as it is extremely powerful, but ultimately failed.

But yes take the dockpanel and add margin and padding and you can throw away everything else.