TextField

fun TextField(    posX: Number = 0,     posY: Number = 0,     width: Number = DEFAULT_TEXT_FIELD_WIDTH,     height: Number = DEFAULT_TEXT_FIELD_HEIGHT,     text: String = "",     prompt: String = "",     font: Font = Font(),     visual: Visual = ColorVisual(Color(240, 240, 240)))

Creates a TextField.

Parameters

posX

Horizontal coordinate for this TextField. Default: 0.

posY

Vertical coordinate for this TextField. Default: 0.

width

Width for this TextField. Default: DEFAULT_TEXT_FIELD_WIDTH.

height

Height for this TextField. Default: DEFAULT_TEXT_FIELD_HEIGHT.

text

Initial text for this TextField. Default: empty String.

prompt

Prompt for this TextField. This gets displayed as a prompt to the user whenever the label is an empty string. Default: empty string.

font

Font to be used to display text.

visual

Visual to be used as a background. Defaults to a Light-gray ColorVisual.