ScreenDefinition

class ScreenDefinition(title: UiText, pausesGame: Boolean = false, content: UiScope.() -> Unit) : AutoCloseable(source)

Deprecated

Use UiDefinition and its returned UiSession.

One-shot platform-neutral definition for one declarative screen.

Construction retains but does not evaluate content. The definition owns its title, pause policy, callback, and caller capture graph until one runtime atomically transfers them or close releases them. Transfer and close may race across threads, but exactly one operation owns the payload and no value is transferred twice. Definitions have referential identity and do not define value equality.

Parameters

title

exact unresolved title retained until transfer or close.

pausesGame

whether the screen pauses its host game.

content

owner-thread callback that emits exactly one root component when evaluated by a runtime.

Constructors

Link copied to clipboard
constructor(title: UiText, pausesGame: Boolean = false, content: UiScope.() -> Unit)
constructor(title: String, pausesGame: Boolean = false, content: UiScope.() -> Unit)

Creates a definition with a literal title.

Functions

Link copied to clipboard

Transfers this compatibility definition into the common UI opening path.

Link copied to clipboard
open override fun close()

Releases an untransferred definition and its complete callback capture graph.

Link copied to clipboard
fun open()

Presents this definition through the runtime installed for the current platform.

Link copied to clipboard

Atomically transfers the complete definition payload to one runtime adapter.