Open 3D Engine LyShine Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiTextInputInterface Class Referenceabstract

Inherits AZ::ComponentBus.

Public Types

typedef AZStd::function< void(AZ::EntityId, const AZStd::string &)> TextInputCallback
 

Public Member Functions

virtual AZ::Color GetTextSelectionColor ()=0
 Get the color to be used for the text background when it is selected.
 
virtual void SetTextSelectionColor (const AZ::Color &color)=0
 Set the color to be used for the text background when it is selected.
 
virtual AZ::Color GetTextCursorColor ()=0
 Get the color to be used for the text cursor.
 
virtual void SetTextCursorColor (const AZ::Color &color)=0
 Set the color to be used for the text cursor.
 
virtual float GetCursorBlinkInterval ()=0
 Get the cursor blink interval.
 
virtual void SetCursorBlinkInterval (float interval)=0
 Set the cursor blink interval, 0 means no blink.
 
virtual int GetMaxStringLength ()=0
 Get the maximum number of character allowed in the edited string.
 
virtual void SetMaxStringLength (int maxCharacters)=0
 
virtual TextInputCallback GetOnChangeCallback ()=0
 Get the on-change callback (called when a character added/removed/changed)
 
virtual void SetOnChangeCallback (TextInputCallback callbackFunction)=0
 Set the on-change callback (called when a character added/removed/changed)
 
virtual TextInputCallback GetOnEndEditCallback ()=0
 Get the on-end-edit callback (called when edit of text is completed)
 
virtual void SetOnEndEditCallback (TextInputCallback callbackFunction)=0
 Set the on-end-edit callback (called when edit of text is completed)
 
virtual TextInputCallback GetOnEnterCallback ()=0
 Get the on-enter callback (called when Enter is pressed on keyboard)
 
virtual void SetOnEnterCallback (TextInputCallback callbackFunction)=0
 Set the on-enter callback (called when Enter is pressed on keyboard)
 
virtual const LyShine::ActionNameGetChangeAction ()=0
 Get the "change" action name, the action is sent to canvas listeners when text is changed.
 
virtual void SetChangeAction (const LyShine::ActionName &actionName)=0
 Set the "change" action name.
 
virtual const LyShine::ActionNameGetEndEditAction ()=0
 
virtual void SetEndEditAction (const LyShine::ActionName &actionName)=0
 Set the "end edit" action name.
 
virtual const LyShine::ActionNameGetEnterAction ()=0
 Get the "enter" action name, the action is sent to canvas listeners when enter is pressed.
 
virtual void SetEnterAction (const LyShine::ActionName &actionName)=0
 Set the "enter" action name.
 
virtual AZ::EntityId GetTextEntity ()=0
 Get the entity id for the text element being edited by this component.
 
virtual void SetTextEntity (AZ::EntityId textEntity)=0
 
virtual AZStd::string GetText ()=0
 Get the text string being edited by this component (from the text element)
 
virtual void SetText (const AZStd::string &text)=0
 
virtual AZ::EntityId GetPlaceHolderTextEntity ()=0
 Get the entity id for the placeholder text element for this component.
 
virtual void SetPlaceHolderTextEntity (AZ::EntityId textEntity)=0
 
virtual bool GetIsPasswordField ()=0
 
virtual void SetIsPasswordField (bool passwordField)=0
 Allows this text input to be configured as a password field.
 
virtual uint32_t GetReplacementCharacter ()=0
 Returns the UTF8 character to be used to display password fields.
 
virtual void SetReplacementCharacter (uint32_t replacementChar)=0
 Sets the UTF8 character that should be used for displaying text in password fields.
 
virtual bool GetIsClipboardEnabled ()=0
 True if copy/cut/paste should be supported, false otherwise.
 
virtual void SetIsClipboardEnabled (bool enableClipboard)=0
 Allows copy/cut/paste support for this text input.
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 Only one component on a entity can implement the events.
 

Member Function Documentation

◆ GetEndEditAction()

virtual const LyShine::ActionName & UiTextInputInterface::GetEndEditAction ( )
pure virtual

Get the "end edit" action name, the action is sent to canvas listeners when the editing of the text is finished - i.e. when the text input component is no longer active

◆ GetIsPasswordField()

virtual bool UiTextInputInterface::GetIsPasswordField ( )
pure virtual

True if this text input is configured as a password field, false otherwise

Password fields will render the displayed text with all of the characters of the input string replaced with a character.

◆ GetReplacementCharacter()

virtual uint32_t UiTextInputInterface::GetReplacementCharacter ( )
pure virtual

Returns the UTF8 character to be used to display password fields.

Note that having a replacement character configured doesn't determine whether this input is configured as a password field (see GetIsPasswordField).

◆ SetMaxStringLength()

virtual void UiTextInputInterface::SetMaxStringLength ( int  maxCharacters)
pure virtual

Set the maximum number of character allowed in the edited string

Parameters
maxCharacters,avalue of 0 means none allowed, -1 means no limit

◆ SetPlaceHolderTextEntity()

virtual void UiTextInputInterface::SetPlaceHolderTextEntity ( AZ::EntityId  textEntity)
pure virtual

Set the entity id for the placeholder text element for this component This must be a child of this entity

◆ SetReplacementCharacter()

virtual void UiTextInputInterface::SetReplacementCharacter ( uint32_t  replacementChar)
pure virtual

Sets the UTF8 character that should be used for displaying text in password fields.

Note that setting a replacement character doesn't determine whether this text input will be used as a password field (see GetIsPasswordField).

◆ SetTextEntity()

virtual void UiTextInputInterface::SetTextEntity ( AZ::EntityId  textEntity)
pure virtual

Set the entity id for the text element being edited by this component This must be a child of this entity


The documentation for this class was generated from the following file: