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)

Observes enabled for CycleButton at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow CycleButton. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@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)

Observes label for CycleButton at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow CycleButton. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@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)

Observes enabled, label for CycleButton at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow CycleButton. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


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 read-only 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.