switch State
Updates the state of the DynamicGUI to a new state and refreshes the buttons to match the new state. If the new state is the same as the current state, no action is taken.
Parameters
new State
The new state of type S to switch to. The buttons and GUI layout will update to reflect this state.