GGUI::TilesProps struct

TilesProps: a source's items as a grid of equal-sized tiles (ui.Tiles). For asset browsers.

ui.Tiles(assets, { .TileWidth = 96, .TileHeight = 112, .Gap = 8, .Selected = &selection },
         [=](UI& ui, ItemID item) { ui.Image(ThumbOf(item)); ui.Label(NameOf(item)); });

A list whose rows are lines of tiles: virtualised, scrollable, selectable, type-to-find, and draggable like a list. Arrow keys move in both directions.

Public variables

float TileWidth
UI units.
float TileHeight
UI units.
float Gap
horizontal and vertical
GGSize Width
its width
GGSize Height
Fit means fill the available space.
std::string_view Class
each tile is "tile": :hover, :checked when selected, :drop
ItemSet* Selected
as ListProps::Selected
GGSelect Select
as ListProps::Select
GGSort Sort
the order shown
ItemMoveFn OnMove
as ListProps::OnMove; dropping on a tile's left half inserts before it
HandlerOf<ItemID> OnSelect
as ListProps::OnSelect
HandlerOf<ItemID> OnActivate
as ListProps::OnActivate