Is there a flow layout in 2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grendahl06

background: I’m converting a JQuery card game into an Android game using Godot. Although I can do the math to position my cards dynamically (eg when a player goes from 3 cards in hand to 10), I’d prefer to just add TextureRects to the scene in code and let the engine handle the positioning for me (you know, the way HTML does or any of the various server side coding frameworks.)

Does Godot have a Flow Layout setting or control? (Which one is it or how do I use it?)


:bust_in_silhouette: Reply From: flurick

The GridContainer is close, maybe even closer to what you traditionally use for a card game layout then flow?

thank you for answering this question. If you’re still willing to help, now that I’ve seen how to use this for creating a hand, is there a way to add a background color for the size of the rectangle? The “Material” property comes closest to what I expect, but it’s not as simple as just picking a color, the way I would in HTML/CSS. Thanks

grendahl06 | 2019-03-31 15:31