A virtualized icon/tile grid: fixed-size tiles that reflow into as many columns as the width
allows, scrolled vertically. Like UIList only the on-screen tiles (+ two rows) exist as
display objects and are recycled by slot mapping, so a grid of any size is cheap.
Data is provider-driven (setProvider / setItems); the default tile draws an optional glyph
over a centered label. Custom tiles subclass UITile and override bind(), supplied through
tileFactory. Input mirrors UIList: wheel + thumb drag everywhere, touch drag with fling on
mobile, arrow-key navigation, Enter/double-click to activate.
Constructor
Variables
tileFactory:UITileGrid ‑> UITile = null
Creates one pooled tile; null uses the default glyph+label UITile.
Methods
scrollTo(index:Int):Void
Scrolls the minimum distance to bring an index's row into view.
Parameters:
index | the entry to reveal |
|---|
select(index:Int, reveal:Bool = false):Void
Selects an index without firing onSelect.
Parameters:
index | the entry to select, or -1 to clear |
|---|---|
reveal |
|
inlinesetItems(items:Array<String>):Void
Convenience data source from an array of labels (see setProvider).
Parameters:
items | the tile labels |
|---|
setProvider(count:Int, label:Int ‑> String, ?glyph:Int ‑> UIGlyph, ?tint:Int ‑> Int):Void
Sets the data source (tiles resolved lazily).
Parameters:
count | the total number of entries |
|---|---|
label | resolves a tile's label for an index |
glyph | optional glyph id for an index ( |
tint | optional glyph colour for an index ( |
setScroll(value:Float):Void
Scrolls to an absolute offset (clamped) and rebinds the visible window.
Parameters:
value | the target offset in pixels |
|---|
inlinetintOf(index:Int):Int
The glyph tint for an index, or the theme accent (used by the default tile).