Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultilineTextBox

An editable text box UI element

Hierarchy

Index

Properties

onTextChanged

onTextChanged: MulticastDelegate<(textBox: this, player: Player, text: string) => void>

Called when the edited text changes.

param

The text box where the text changed

param

The player that changed the text. undefined if the text was changed through setText.

param

The new text

Methods

getMaxLength

  • getMaxLength(): number
  • Return the maximum number of characters allowed for this text box

    Returns number

getOwningObject

getParent

  • getParent(): Widget | undefined
  • 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 | undefined

getText

  • getText(): string
  • Return the currently displayed text.

    Returns string

isEnabled

  • isEnabled(): boolean

setEnabled

  • setEnabled(enabled: boolean): Widget
  • Set whether the widget is enabled. When a widget is disabled, users can't interact with it and it is greyed out. When a widget that contains other widgets (like VerticalBox) is disabled, all its children behave as if disabled, too. By default, widgets are enabled.

    Parameters

    • enabled: boolean

      Whether to enable the widget.

    Returns Widget

setFontSize

setMaxLength

  • Set the maximum number of characters allowed for this text box

    Parameters

    • length: number

      Maximum number of characters. Must be between 1 and 2000. Default: 200

    Returns MultilineTextBox

setText