ComboBox

fun <T> ComboBox(    posX: Number = 0,     posY: Number = 0,     width: Number = DEFAULT_COMBOBOX_WIDTH,     height: Number = DEFAULT_COMBOBOX_HEIGHT,     font: Font = Font(),     prompt: String = "",     items: List<T> = emptyList(),     formatFunction: (T) -> String? = null)

Creates a ComboBox.

Parameters

T

Generic ComboBox content.

posX

Horizontal coordinate for this ComboBox. Default: 0.

posY

Vertical coordinate for this ComboBox. Default: 0.

width

Width for this ComboBox. Default: DEFAULT_COMBOBOX_WIDTH.

height

Height for this ComboBox. Default: DEFAULT_COMBOBOX_HEIGHT.

font

Font to be used for the options. Default: default Font constructor.

items

The initial selection of items. Default: empty list.

formatFunction

The formatFunction that is used to represent the items. Default: null.