SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
230 stars 21 forks source link

Implement CountGrid #132

Closed Uriopass closed 9 months ago

Uriopass commented 9 months ago

Implement a grid based on a given number of cross-axis row/columns and usual List parameters (cross/main axis alignment, main size..)

Note that there's a lot of tricky questions around what to do if the constraint min is bigger than the cell sizes. I have copied the list behavior which is to not do anything about it for the cell layout.

The provided example allows testing the different behaviors. I'm guessing it'll have to be iterated on upon usage but it should be a not-so-bad foundation.

https://github.com/SecondHalfGames/yakui/assets/5420739/6109cc01-9afc-40da-a865-43136625c0a6