Members

(static, constant) BUTTON_FONT_SIZE

TextSizeTask measures at this size and showButtons renders at it. They must agree or the labels are laid out to the wrong widths, so it is one constant rather than two literals.

Default Value
  • 40

Methods

(static) applyFallbackFontScale(labelNode) → {void}

Parameters:
NameTypeDescription
labelNodeobject
Returns:
Type: 
void

(static) applyTheme() → {void}

Returns:
Type: 
void

(static) cancelTextSizeTask() → {void}

Stop, unobserve, and drop the in-flight TextSizeTask if one exists. Safe to call when none is active. The single teardown path for m.textSizeTask, mirroring QueueManager's cancelActive*. JRButtons extends Group, so no onDestroy lifecycle hook runs on it — releasing the node as soon as its one-shot measurement lands is what keeps it from outliving the screen.

Returns:
Type: 
void

(static) focusChanged() → {void}

Change opacity of the highlighted menu item based on focus

Returns:
Type: 
void

(static) highlightSelected(index, animateopt) → {void}

Highlight selected menu option

Parameters:
NameTypeAttributesDefaultDescription
indexinteger
animatedynamic<optional>
true
Returns:
Type: 
void

(static) init() → {void}

Returns:
Type: 
void

(static) onKeyEvent(key, press) → {boolean}

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onSelectedIndexChanged() → {void}

When Selected Index set, ensure it is the one Focused

Returns:
Type: 
void

(static) renderChanged() → {void}

When options are fully displayed, set focus and selected option

Returns:
Type: 
void

(static) showButtons() → {void}

Rebuilds the label row. Clears first so a second buttons write replaces the row instead of appending a second copy of it — createChild appends, and buttonCount drives key nav.

Returns:
Type: 
void

(static) updateButtons() → {void}

buttons onChange. The measurement has to happen on a Task: it needs roFontRegistry, which Roku refuses to create on the render thread ("MAIN|TASK-only component"). The task is built per write and released in showButtons, so nothing is retained between measurements.

Returns:
Type: 
void