state

fun <T> state(initial: T): GuiContext.GuiState<T>

Creates a state delegate for this GUI. Changing the state will automatically trigger update.

Parameters

initial

The initial value of the state.