Options
All
  • Public
  • Public/Protected
  • All
Menu

Selection box UI element

Hierarchy

Index

Properties

onSelectionChanged

onSelectionChanged: MulticastDelegate<(selectionBox: this, player: Player, index: number, option: string) => void>

Called when the selection is changed by a player

param

The selection box that was changed

param

The player who changed the selection

param

The selected index

param

The selected option

Methods

addOption

getOwningObject

getParent

  • Return the widget that contains this widget, for example a border that wraps a check box. Returns undefined if this object has no parent.

    Returns Widget

getSelectedIndex

  • getSelectedIndex(): number
  • Get the index of the currently selected option. -1 if nothing is selected because this selection box has no options.

    Returns number

getSelectedOption

  • getSelectedOption(): string
  • Return the currently selected option

    Returns string

setSelectedIndex

  • Set the index of the currently selected option. Will have no effect if there is no option at that index.

    Parameters

    • index: number

    Returns SelectionBox

setSelectedOption

  • Set the currently selected option. Will not have an effect if no such option exists.

    Parameters

    • text: string

    Returns SelectionBox