TextInputComponent

Receive a string and pass it to TextComponent.

# Properties

[{"index":"boolean AllowAutomaticTranslation (MakerOnly)","0":"Sets whether to automatically translate the value of the PlaceHolder property."}]

[{"index":"boolean AutoClear","0":"Sets whether to initialize the input area automatically upon completing text input."}]

[{"index":"int32 CharacterLimit","0":"The maximum number of characters that can be entered."}]

[{"index":"InputContentType ContentType","0":"Specifies the type that can be inputted."}]

[{"index":"boolean IgnoreMapLayerCheck (Sync)","0":"Does not perform automatic substitution when the Map Layer's name is specified in SortingLayer."}]

[{"index":"boolean IsFocused (ReadOnly) (HideFromInspector)","0":"Displays on whatever is active at the time."}]

[{"index":"boolean IsLocalizationKey (MakerOnly)","0":"Finds the text matching the current language settings and displays as a default phrase in LocaleDataSet if the value is set to true. A Key will be used as PlaceHolder's property value. The actual value of PlaceHolder's property does not change."}]

[{"index":"InputLineType LineType","0":"Specifies how to enter."}]

[{"index":"int32 OrderInLayer (Sync)","0":"Determines the priority within the same layer. A higher number indicates higher priority."}]

[{"index":"boolean OverrideSorting (Sync) (ReadOnly)","0":"Determines whether to set the SortingLayer and OrderInLayer values manually."}]

[{"index":"string PlaceHolder","0":"The default text displayed when no text is entered."}]

[{"index":"Color PlaceHolderColor","0":"Sets the PlaceHolder color."}]

[{"index":"string SortingLayer (Sync)","0":"When two or more entities overlap, the priority is determined according to the Sorting Layer."}]

[{"index":"string Text (HideFromInspector)","0":"The input content."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

[{"index":"void ActivateInputField()","0":"Enables text input. IsFoucsed value is changed to true a few frames after calling ActivateInputFied()."}]

[{"index":"string GetLocalizedPlaceHolder()","0":"Finds and returns the text matching the current language settings in LocaleDataSet when IsLocalizationKey's value is true. A Key will be used as PlaceHolder's property value. Returns PlaceHolder's property value when IsLocalizationKey's value is false."}]

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# Events

[{"index":"OrderInLayerChangedEvent","0":"This event occurs when changing the Component's OrderInLayer."}]

[{"index":"SortingLayerChangedEvent","0":"This event occurs when changing the component's SortingLayer."}]

[{"index":"TextInputEndEditEditorEvent","0":"The editor event occurs after changing the value of InputField."}]

[{"index":"TextInputEndEditEvent","0":"The event occurs after changing the value of InputField."}]

[{"index":"TextInputSubmitEditorEvent","0":"An event that is called when the Enter key is pressed."}]

[{"index":"TextInputSubmitEvent","0":"An event that is called when the Enter key is pressed."}]

[{"index":"TextInputValueChangeEditorEvent","0":"The editor event occurs when changing the value of InputField."}]

[{"index":"TextInputValueChangeEvent","0":"The event occurs when changing the value of InputField."}]

# Examples

This is an example of receiving an input ID and password.
    
    
    @Component
    script LoginInputHandler extends Component
        property string Id = ""
        property string Password = ""
        property any IdInput = nil
        property any PasswordInput = nil
    
        @ExecSpace("ClientOnly")
        method void OnBeginPlay()
        self.IdInput.Text = ""
        self.IdInput.PlaceHolder = "Id"
    
        self.PasswordInput.Text = ""
        self.PasswordInput.PlaceHolder = "password"
        self.PasswordInput.ContentType = InputContentType.Password
        end
    
        @EventSender("Self")
        handler HandleTextInputEndEditEvent(TextInputEndEditEvent event)
        -- Parameters
        local text = event.text
        --------------------------------------------------------
        log("The ID entered is " .. self.InputId .. ".")
        end
    
        @EventSender("Self")
        handler HandleTextInputEndEditEvent2(TextInputEndEditEvent event)
        -- Parameters
        local text = event.text
        --------------------------------------------------------
        self.Password = text
        log("The password entered is " .. self.Password .. ".")
        end
    end
    

# SeeAlso

  * TextInputEndEditEvent
  * Entity
  * [Basic UI Components](/docs?postId=744)