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.

Parameters:
NameTypeDescription
contentRootobject

the RowList's root ContentNode (m.top.content)

Returns:
Type: 
void

(static) calculateTextureItemSpacing(rowItemSpacing) → {integer}

Extracts horizontal item spacing from the RowList rowItemSpacing field.

Parameters:
NameTypeDescription
rowItemSpacingdynamic

flat [x,y] or nested [[x,y]]

Returns:

horizontal spacing in pixels

Type: 
integer

(static) calculateTextureVisibleWidth(itemSize, focusXOffset) → {integer}

Calculates the usable row width for determining how many items fit on screen.

Parameters:
NameTypeDescription
itemSizedynamic

RowList itemSize field ([containerWidth, containerHeight])

focusXOffsetdynamic

RowList focusXOffset field (array like [96] or empty [])

Returns:

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.

Parameters:
NameTypeDescription
contentRootobject

the RowList's root ContentNode (m.top.content)

Returns:
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.

Parameters:
NameTypeDescription
contentRootobject

the RowList's root ContentNode (m.top.content)

Returns:
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.

Parameters:
NameTypeDescription
contentRootobject

the RowList's root ContentNode (m.top.content)

itemSizedynamic

RowList itemSize field ([containerWidth, containerHeight])

focusXOffsetdynamic

RowList focusXOffset field (array like [96] or empty [])

rowItemSpacingdynamic

RowList rowItemSpacing field (flat [x,y] or nested [[x,y]])

Returns:
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.

Parameters:
NameTypeDescription
contentRootobject

the MarkupGrid's root ContentNode (m.data / m.itemGrid.content)

focusedIndexdynamic

flat index of the focused item (itemGrid.itemFocused)

numColumnsinteger

number of columns in the grid (itemGrid.numColumns)

numVisibleRowsinteger

number of rows visible on screen (itemGrid.numRows)

Returns:
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.

Parameters:
NameTypeDescription
contentRootobject

the RowList's root ContentNode (m.top.content)

focusedRowdynamic

index of the currently focused row (rowItemFocused[0])

focusedColumndynamic

index of the currently focused column (rowItemFocused[1])

numVisibleRowsinteger

number of rows visible on screen (RowList.numRows)

Returns:
Type: 
void