SceneManager

class SceneManager(val screen: Screen)

Loads scene documents and applies their layouts to a screen.

Constructors

Link copied to clipboard
constructor(screen: Screen)

Properties

Link copied to clipboard

The screen whose children are replaced by transition and captured by write.

Functions

Link copied to clipboard
fun read(text: String)

Decodes a JSON scene document using snake_case property names.

Link copied to clipboard

Registers a creator for a custom screen object type used when restoring scenes.

Link copied to clipboard
fun transition(index: Int)

Replaces the screen's children with the selected scene's restored children.

Link copied to clipboard
fun write(): String

Serializes the current screen as a version 1 JSON document containing one unnamed scene.