CycleButton

@JvmName(name = "CycleButtonState454065400fd3_1")
fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: (T) -> UiText = { value -> UiText.Literal(state.formatKnownMember(value)) })(source)

Source-backed CycleButton observing enabled at the next frame cutoff. Sources remain caller-owned; compatible nodes retain editing, focus, and scrolling state. Literal arguments keep their existing contracts. Equal source values do not re-evaluate this component. The complete modifier chain stays on the actual component; the wrapper delegates parent data and owns the sibling key. Keep sources and dedicated editing states outside observed callbacks. Evaluation and input failures follow ordinary runtime cleanup.


@JvmName(name = "CycleButtonState454065400fd3_2")
fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: StateSource<(T) -> UiText>)(source)

Source-backed CycleButton observing label at the next frame cutoff. Sources remain caller-owned; compatible nodes retain editing, focus, and scrolling state. Literal arguments keep their existing contracts. Equal source values do not re-evaluate this component. The complete modifier chain stays on the actual component; the wrapper delegates parent data and owns the sibling key. Keep sources and dedicated editing states outside observed callbacks. Evaluation and input failures follow ordinary runtime cleanup.


@JvmName(name = "CycleButtonState454065400fd3_3")
fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: StateSource<(T) -> UiText>)(source)

Source-backed CycleButton observing enabled, label at the next frame cutoff. Sources remain caller-owned; compatible nodes retain editing, focus, and scrolling state. Literal arguments keep their existing contracts. Equal source values do not re-evaluate this component. The complete modifier chain stays on the actual component; the wrapper delegates parent data and owns the sibling key. Keep sources and dedicated editing states outside observed callbacks. Evaluation and input failures follow ordinary runtime cleanup.


fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: (T) -> UiText = { value -> UiText.Literal(state.formatKnownMember(value)) })(source)

Emits one finite-option Minecraft-profile CycleButton.

Pointer press, wheel, and focused keyboard input update caller-owned state before emitting the typed cycle action through modifier. Labels are evaluated once for the immutable option snapshot and must be supported by the active profile. The default label uses the display conversion owned by state; an explicit label may instead provide translated or composed text. Label or state-conversion exceptions propagate synchronously before element emission.

Receiver

active owner-thread screen scope.

Parameters

state

caller-owned finite option state.

width

fixed logical button width.

enabled

whether input and enabled appearance are active.

modifier

active layout, input, and typed action behavior.

key

optional stable sibling identity.

label

maps each option to its visible unresolved label, defaulting to the state-owned display conversion.

Type Parameters

T

immutable option type.

Throws

when the scope is unavailable, no profile runtime is active, or the default conversion is evaluated outside the state-owning thread.