UISystem. UITextInput

UITextInput - An editable text input field

  • A simple text entry field that supports basic editing
  • Suitable for short text input like names or numbers
  • Reads a physical keyboard: no on-screen keyboard opens on touch devices, and IME composition and paste do not type, use an HTML input element for those

Constructor

new UITextInput(posopt, sizeopt, textopt)

Create a UITextInput object

Parameters:
NameTypeAttributesDescription
posVector2<optional>
sizeVector2<optional>
textstring<optional>

Extends

  • UIObject

Members

maxLength

Properties
TypeDescription
number

Max length of input (0 = no limit)

Methods

click(playSoundopt)

Start editing the text, called when it is clicked

Parameters:
NameTypeAttributesDefaultDescription
playSoundboolean<optional>
true

onKeyDown(e)

Key down event handler if this object is being edited

Parameters:
NameTypeDescription
eKeyboardEvent

stopEditing()

Stop editing the text