Members
(static, constant) TEXTURE_BUFFER_THRESHOLD
Maximum items a row can have before horizontal buffer logic kicks in. Rows at or below this count use renderTracking only — all items stay loaded when on screen because they fit comfortably in texture memory.
- Default Value
- 20
Methods
(static) activateTextureManager(contentRoot) → {void}
Activates texture management after initial content load or on onScreenShown. Transitions state from "init" or "hidden" to "active", enabling buffer-based texture management. Callers should update loadedRowRange before calling this.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the RowList's root ContentNode (m.top.content) |
- Type:
- void
(static) calculateTextureItemSpacing(rowItemSpacing) → {integer}
Extracts horizontal item spacing from the RowList rowItemSpacing field.
| Name | Type | Description |
|---|---|---|
rowItemSpacing | dynamic | flat [x,y] or nested [[x,y]] |
horizontal spacing in pixels
- Type:
- integer
(static) calculateTextureVisibleWidth(itemSize, focusXOffset) → {integer}
Calculates the usable row width for determining how many items fit on screen.
| Name | Type | Description |
|---|---|---|
itemSize | dynamic | RowList itemSize field ([containerWidth, containerHeight]) |
focusXOffset | dynamic | RowList focusXOffset field (array like [96] or empty []) |
usable pixel width
- Type:
- integer
(static) destroyTextureManager(contentRoot) → {void}
Destroys texture management during component teardown. All cells force-unload unconditionally — no guards, no buffer checks.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the RowList's root ContentNode (m.top.content) |
- Type:
- void
(static) hideTextureManager(contentRoot) → {void}
Hides texture management when the screen is no longer visible. Freezes all cells in their current state — textures stay loaded so returning is instant. renderTracking changes are ignored while hidden.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the RowList's root ContentNode (m.top.content) |
- Type:
- void
(static) initTextureManager(contentRoot, itemSize, focusXOffset, rowItemSpacing) → {void}
Adds texture management fields to a RowList content root node. Sets initial state to "init" — cells will not unload during layout changes.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the RowList's root ContentNode (m.top.content) |
itemSize | dynamic | RowList itemSize field ([containerWidth, containerHeight]) |
focusXOffset | dynamic | RowList focusXOffset field (array like [96] or empty []) |
rowItemSpacing | dynamic | RowList rowItemSpacing field (flat [x,y] or nested [[x,y]]) |
- Type:
- void
(static) updateGridTextureBufferRange(contentRoot, focusedIndex, numColumns, numVisibleRows) → {void}
Calculates and sets the loaded row range for a MarkupGrid based on current focus. Unlike updateTextureBufferRange() which works with hierarchical RowList content (children = rows), this works with flat MarkupGrid content (children = items) and derives row indices from the flat item index and column count.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the MarkupGrid's root ContentNode (m.data / m.itemGrid.content) |
focusedIndex | dynamic | flat index of the focused item (itemGrid.itemFocused) |
numColumns | integer | number of columns in the grid (itemGrid.numColumns) |
numVisibleRows | integer | number of rows visible on screen (itemGrid.numRows) |
- Type:
- void
(static) updateTextureBufferRange(contentRoot, focusedRow, focusedColumn, numVisibleRows) → {void}
Calculates and sets the loaded row range and focused column based on current focus. The vertical range includes all visible rows plus a 2-row buffer above and below.
| Name | Type | Description |
|---|---|---|
contentRoot | object | the RowList's root ContentNode (m.top.content) |
focusedRow | dynamic | index of the currently focused row (rowItemFocused[0]) |
focusedColumn | dynamic | index of the currently focused column (rowItemFocused[1]) |
numVisibleRows | integer | number of rows visible on screen (RowList.numRows) |
- Type:
- void