I have recently implemented the FlexBox widget locally, maybe this could be added as future library?
gdx-flexbox

// my initial implementation
flexBox {
label("Item 1") {
setAlignment(Align.center)
}.flex {
setSize(100f)
}
label("Item 2") {
setAlignment(Align.center)
}.flex {
setWidth(100f).setHeight(100f)
positionType = YogaPositionType.ABSOLUTE
setPosition(YogaEdge.LEFT, 10f)
}
}
or
flexBox {
label("Item 1") {
setAlignment(Align.center)
}.flex(size = 100f)
label("Item 2") {
setAlignment(Align.center)
}.flex(width = 100f, height = 100f, positionType = YogaPositionType.ABSOLUTE, positionLeft = 10f)
}
extensions .flex could be implemented like .cell
I have recently implemented the
FlexBoxwidget locally, maybe this could be added as future library?gdx-flexbox
extensions
.flexcould be implemented like.cell