Making it possible to switch between different states (e.g. playstate
menustate)