CardComponent
A block with a picture, a title, text and buttons, for grids of things to choose from.
Java
Inside a PanelComponent constructor. The same call draws in every family and chroma.
Java
Box[] places = CardComponent.grid(at(new Box("maps", 10, 10, 280, 0)), 2, 6, 74, maps.size());
for (int i = 0; i < places.length; i++) {
MapInfo map = maps.get(i);
add(new CardComponent(places[i]).title(map.name()).subtitle(map.author())
.text(map.about()).image(map.picture(), 28)
.onClick(() -> open(map)).footerButton(words.get("mymod.play"), ButtonComponent.Role.PRIMARY, () -> play(map)));
}Full
