switchState

fun switchState(state: S)

Switches the current state of the GUI to the specified state. If the given state is different from the current state, it updates the state, resets the current page to the first page (index 0), and updates the display.

Parameters

state

The new state to switch to. Typically corresponds to a mapped set of items in the GUI.