|
| enum | ContentType {
Standard,
Autocorrected,
IntegerNumber,
DecimalNumber,
Alphanumeric,
Name,
EmailAddress,
Password,
Pin,
Custom
} |
| |
| enum | InputType { Standard,
AutoCorrect,
Password
} |
| |
| enum | CharacterValidation {
None,
Digit,
Integer,
Decimal,
Alphanumeric,
Name,
Regex,
EmailAddress,
CustomValidator
} |
| |
| enum | LineType { SingleLine,
MultiLineSubmit,
MultiLineNewline
} |
| |
|
|
delegate char | OnValidateInput (string text, int charIndex, char addedChar) |
| |
| void | MoveTextEnd (bool shift) |
| | Move to the end of the text. More...
|
| |
| void | MoveTextStart (bool shift) |
| | Move to the start of the text. More...
|
| |
| void | MoveToEndOfLine (bool shift, bool ctrl) |
| | Move to the end of the current line of text. More...
|
| |
| void | MoveToStartOfLine (bool shift, bool ctrl) |
| | Move to the start of the current line of text. More...
|
| |
|
virtual void | OnBeginDrag (PointerEventData eventData) |
| |
|
virtual void | OnDrag (PointerEventData eventData) |
| |
|
virtual void | OnEndDrag (PointerEventData eventData) |
| |
|
override void | OnPointerDown (PointerEventData eventData) |
| |
|
void | ProcessEvent (Event e) |
| |
| virtual void | OnUpdateSelected (BaseEventData eventData) |
| |
| virtual void | OnScroll (PointerEventData eventData) |
| |
|
void | ForceLabelUpdate () |
| |
|
virtual void | Rebuild (CanvasUpdate update) |
| |
|
virtual void | LayoutComplete () |
| |
|
virtual void | GraphicUpdateComplete () |
| |
|
void | ActivateInputField () |
| |
|
override void | OnSelect (BaseEventData eventData) |
| |
|
virtual void | OnPointerClick (PointerEventData eventData) |
| |
|
void | OnControlClick () |
| |
|
void | DeactivateInputField () |
| |
|
override void | OnDeselect (BaseEventData eventData) |
| |
|
virtual void | OnSubmit (BaseEventData eventData) |
| |
| void | SetGlobalPointSize (float pointSize) |
| | Function to conveniently set the point size of both Placeholder and Input Field text object. More...
|
| |
| void | SetGlobalFontAsset (TMP_FontAsset fontAsset) |
| | Function to conveniently set the Font Asset of both Placeholder and Input Field text object. More...
|
| |
|
|
void | ClampStringPos (ref int pos) |
| |
|
void | ClampCaretPos (ref int pos) |
| |
|
override void | OnEnable () |
| |
|
override void | OnDisable () |
| |
|
void | OnFocus () |
| |
|
void | SelectAll () |
| |
| virtual void | LateUpdate () |
| | Update the text based on input. More...
|
| |
|
EditState | KeyPressed (Event evt) |
| |
| virtual void | Append (string input) |
| | Append the specified text to the end of the current. More...
|
| |
|
virtual void | Append (char input) |
| |
| void | SendOnEndEdit () |
| | Submit the input field's text. More...
|
| |
|
void | SendOnSubmit () |
| |
|
void | SendOnFocus () |
| |
|
void | SendOnFocusLost () |
| |
|
void | SendOnTextSelection () |
| |
|
void | SendOnEndTextSelection () |
| |
| void | UpdateLabel () |
| | Update the visual text Text. More...
|
| |
| char | Validate (string text, int pos, char ch) |
| | Validate the specified input. More...
|
| |
|
override void | DoStateTransition (SelectionState state, bool instant) |
| |
|
|
TouchScreenKeyboard | m_Keyboard |
| |
| RectTransform | m_TextViewport |
| | Text Text used to display the input's value. More...
|
| |
|
TMP_Text | m_TextComponent |
| |
|
RectTransform | m_TextComponentRectTransform |
| |
|
Graphic | m_Placeholder |
| |
|
Scrollbar | m_VerticalScrollbar |
| |
|
TMP_ScrollbarEventHandler | m_VerticalScrollbarEventHandler |
| |
| float | m_ScrollSensitivity = 1.0f |
| |
| string | m_Text = string.Empty |
| | Input field's value. More...
|
| |
|
int | m_StringPosition = 0 |
| |
|
int | m_StringSelectPosition = 0 |
| |
|
int | m_CaretPosition = 0 |
| |
|
int | m_CaretSelectPosition = 0 |
| |
|
UIVertex [] | m_CursorVerts = null |
| |
|
Mesh | m_Mesh |
| |
|
bool | m_CaretVisible |
| |
|
TMP_FontAsset | m_GlobalFontAsset |
| |
|
bool | m_OnFocusSelectAll = true |
| |
|
bool | m_isSelectAll |
| |
|
bool | m_ResetOnDeActivation = true |
| |
|
bool | m_isRichTextEditingAllowed = true |
| |
|
TMP_InputValidator | m_InputValidator = null |
| |
|
|
Mesh | mesh [get] |
| |
| bool | shouldHideMobileInput [get, set] |
| | Should the mobile keyboard input be hidden. More...
|
| |
| string | text [get, set] |
| | Input field's current text value. More...
|
| |
|
bool | isFocused [get] |
| |
|
float | caretBlinkRate [get, set] |
| |
|
int | caretWidth [get, set] |
| |
|
RectTransform | textViewport [get, set] |
| |
|
TMP_Text | textComponent [get, set] |
| |
|
Graphic | placeholder [get, set] |
| |
|
Scrollbar | verticalScrollbar [get, set] |
| |
|
float | scrollSensitivity [get, set] |
| |
|
Color? | caretColor [get, set] |
| |
|
bool | customCaretColor [get, set] |
| |
|
Color | selectionColor [get, set] |
| |
|
SubmitEvent | onEndEdit [get, set] |
| |
|
SubmitEvent | onSubmit [get, set] |
| |
|
SelectionEvent | onSelect [get, set] |
| |
|
SelectionEvent | onDeselect [get, set] |
| |
|
TextSelectionEvent | onTextSelection [get, set] |
| |
|
TextSelectionEvent | onEndTextSelection [get, set] |
| |
|
OnChangeEvent | onValueChanged [get, set] |
| |
|
OnValidateInput | onValidateInput [get, set] |
| |
|
int | characterLimit [get, set] |
| |
| float | pointSize [get, set] |
| | Set the point size on both Placeholder and Input text object. More...
|
| |
| TMP_FontAsset | fontAsset [get, set] |
| | Sets the Font Asset on both Placeholder and Input child objects. More...
|
| |
| bool | onFocusSelectAll [get, set] |
| | Determines if the whole text will be selected when focused. More...
|
| |
| bool | resetOnDeActivation [get, set] |
| | Determines if the text and caret position as well as selection will be reset when the input field is deactivated. More...
|
| |
| bool | restoreOriginalTextOnEscape [get, set] |
| | Controls whether the original text is restored when pressing "ESC". More...
|
| |
| bool | isRichTextEditingAllowed [get, set] |
| | Is Rich Text editing allowed? More...
|
| |
|
ContentType | contentType [get, set] |
| |
|
LineType | lineType [get, set] |
| |
|
InputType | inputType [get, set] |
| |
|
TouchScreenKeyboardType | keyboardType [get, set] |
| |
|
CharacterValidation | characterValidation [get, set] |
| |
| TMP_InputValidator | inputValidator [get, set] |
| | Sets the Input Validation to use a Custom Input Validation script. More...
|
| |
|
bool | readOnly [get, set] |
| |
|
bool | richText [get, set] |
| |
|
bool | multiLine [get] |
| |
|
char | asteriskChar [get, set] |
| |
|
bool | wasCanceled [get] |
| |
| int | caretPositionInternal [get, set] |
| | Current position of the cursor. Getters are public Setters are protected More...
|
| |
|
int | stringPositionInternal [get, set] |
| |
|
int | caretSelectPositionInternal [get, set] |
| |
|
int | stringSelectPositionInternal [get, set] |
| |
|
bool | hasSelection [get] |
| |
| int | caretPosition [get, set] |
| | Get: Returns the focus position as thats the position that moves around even during selection. Set: Set both the anchor and focus position such that a selection doesn't happen More...
|
| |
| int | selectionAnchorPosition [get, set] |
| | Get: Returns the fixed position of selection Set: If Input.compositionString is 0 set the fixed position More...
|
| |
| int | selectionFocusPosition [get, set] |
| | Get: Returns the variable position of selection Set: If Input.compositionString is 0 set the variable position More...
|
| |
| int | stringPosition [get, set] |
| |
| int | selectionStringAnchorPosition [get, set] |
| | The fixed position of the selection in the raw string which may contains rich text. More...
|
| |
| int | selectionStringFocusPosition [get, set] |
| | The variable position of the selection in the raw string which may contains rich text. More...
|
| |
|
static string | clipboard [get, set] |
| |
|
| void | ON_TEXT_CHANGED (UnityEngine.Object obj) |
| | Method used to update the tracking of the caret position when the text object has been regenerated. More...
|
| |
|
IEnumerator | CaretBlink () |
| |
|
void | SetCaretVisible () |
| |
|
void | SetCaretActive () |
| |
|
bool | InPlaceEditing () |
| |
|
bool | MayDrag (PointerEventData eventData) |
| |
|
IEnumerator | MouseDragOutsideRect (PointerEventData eventData) |
| |
|
bool | IsValidChar (char c) |
| |
|
string | GetSelectedString () |
| |
|
int | FindtNextWordBegin () |
| |
|
void | MoveRight (bool shift, bool ctrl) |
| |
|
int | FindtPrevWordBegin () |
| |
|
void | MoveLeft (bool shift, bool ctrl) |
| |
|
int | LineUpCharacterPosition (int originalPos, bool goToFirstChar) |
| |
|
int | LineDownCharacterPosition (int originalPos, bool goToLastChar) |
| |
|
int | PageUpCharacterPosition (int originalPos, bool goToFirstChar) |
| |
|
int | PageDownCharacterPosition (int originalPos, bool goToLastChar) |
| |
|
void | MoveDown (bool shift) |
| |
|
void | MoveDown (bool shift, bool goToLastChar) |
| |
|
void | MoveUp (bool shift) |
| |
|
void | MoveUp (bool shift, bool goToFirstChar) |
| |
|
void | MovePageUp (bool shift) |
| |
|
void | MovePageUp (bool shift, bool goToFirstChar) |
| |
|
void | MovePageDown (bool shift) |
| |
|
void | MovePageDown (bool shift, bool goToLastChar) |
| |
|
void | Delete () |
| |
| void | ForwardSpace () |
| | Handling of DEL key More...
|
| |
| void | Backspace () |
| | Handling of Backspace key More...
|
| |
|
void | Insert (char c) |
| |
|
void | SendOnValueChangedAndUpdateLabel () |
| |
|
void | SendOnValueChanged () |
| |
|
void | UpdateScrollbar () |
| |
| void | OnScrollbarValueChange (float value) |
| | Function to update the vertical position of the text container when OnValueChanged event is received from the Scrollbar. More...
|
| |
| void | AdjustTextPositionRelativeToViewport (float relativePosition) |
| | Adjusts the relative position of the body of the text relative to the viewport. More...
|
| |
|
int | GetCaretPositionFromStringIndex (int stringIndex) |
| |
|
int | GetStringIndexFromCaretPosition (int caretPosition) |
| |
|
void | MarkGeometryAsDirty () |
| |
|
void | UpdateGeometry () |
| |
| void | AssignPositioningIfNeeded () |
| | Method to keep the Caret RectTransform properties in sync with the text object's RectTransform More...
|
| |
|
void | OnFillVBO (Mesh vbo) |
| |
|
void | GenerateCaret (VertexHelper vbo, Vector2 roundingOffset) |
| |
|
void | CreateCursorVerts () |
| |
|
void | GenerateHightlight (VertexHelper vbo, Vector2 roundingOffset) |
| |
| void | AdjustRectTransformRelativeToViewport (Vector2 startPosition, float height, bool isCharVisible) |
| |
|
void | ActivateInputFieldInternal () |
| |
|
void | EnforceContentType () |
| |
|
void | SetTextComponentWrapMode () |
| |
|
void | SetTextComponentRichTextMode () |
| |
|
void | SetToCustomIfContentTypeIsNot (params ContentType[] allowedContentTypes) |
| |
|
void | SetToCustom () |
| |
|
void | SetToCustom (CharacterValidation characterValidation) |
| |
|
| float | m_ScrollPosition |
| | Used to keep track of scroll position More...
|
| |
|
ContentType | m_ContentType = ContentType.Standard |
| |
| InputType | m_InputType = InputType.Standard |
| | Type of data expected by the input field. More...
|
| |
| char | m_AsteriskChar = '*' |
| | The character used to hide text in password field. More...
|
| |
| TouchScreenKeyboardType | m_KeyboardType = TouchScreenKeyboardType.Default |
| | Keyboard type applies to mobile keyboards that get shown. More...
|
| |
|
LineType | m_LineType = LineType.SingleLine |
| |
| bool | m_HideMobileInput = false |
| | Should hide mobile input. More...
|
| |
| CharacterValidation | m_CharacterValidation = CharacterValidation.None |
| | What kind of validation to use with the input field's data. More...
|
| |
| string | m_RegexValue = string.Empty |
| | The Regex expression used for validating the text input. More...
|
| |
| float | m_GlobalPointSize = 14 |
| | The point sized used by the placeholder and input text object. More...
|
| |
| int | m_CharacterLimit = 0 |
| | Maximum number of characters allowed before input no longer works. More...
|
| |
| SubmitEvent | m_OnEndEdit = new SubmitEvent() |
| | Event delegates triggered when the input field submits its data. More...
|
| |
| SubmitEvent | m_OnSubmit = new SubmitEvent() |
| | Event delegates triggered when the input field submits its data. More...
|
| |
| SelectionEvent | m_OnSelect = new SelectionEvent() |
| | Event delegates triggered when the input field is focused. More...
|
| |
| SelectionEvent | m_OnDeselect = new SelectionEvent() |
| | Event delegates triggered when the input field focus is lost. More...
|
| |
| TextSelectionEvent | m_OnTextSelection = new TextSelectionEvent() |
| | Event delegates triggered when the text is selected / highlighted. More...
|
| |
| TextSelectionEvent | m_OnEndTextSelection = new TextSelectionEvent() |
| | Event delegates triggered when text is no longer select / highlighted. More...
|
| |
| OnChangeEvent | m_OnValueChanged = new OnChangeEvent() |
| | Event delegates triggered when the input field changes its data. More...
|
| |
| OnValidateInput | m_OnValidateInput |
| | Custom validation callback. More...
|
| |
|
Color | m_CaretColor = new Color(50f / 255f, 50f / 255f, 50f / 255f, 1f) |
| |
|
bool | m_CustomCaretColor = false |
| |
|
Color | m_SelectionColor = new Color(168f / 255f, 206f / 255f, 255f / 255f, 192f / 255f) |
| |
|
float | m_CaretBlinkRate = 0.85f |
| |
|
int | m_CaretWidth = 1 |
| |
|
bool | m_ReadOnly = false |
| |
|
bool | m_RichText = true |
| |
|
RectTransform | caretRectTrans = null |
| |
|
CanvasRenderer | m_CachedInputRenderer |
| |
|
Vector2 | m_DefaultTransformPosition |
| |
|
Vector2 | m_LastPosition |
| |
|
bool | m_AllowInput = false |
| |
|
bool | m_ShouldActivateNextUpdate = false |
| |
|
bool | m_UpdateDrag = false |
| |
|
bool | m_DragPositionOutOfBounds = false |
| |
|
const float | kHScrollSpeed = 0.05f |
| |
|
const float | kVScrollSpeed = 0.10f |
| |
|
Coroutine | m_BlinkCoroutine = null |
| |
|
float | m_BlinkStartTime = 0.0f |
| |
|
Coroutine | m_DragCoroutine = null |
| |
|
string | m_OriginalText = "" |
| |
|
bool | m_WasCanceled = false |
| |
|
bool | m_HasDoneFocusTransition = false |
| |
|
bool | m_IsScrollbarUpdateRequired = false |
| |
|
bool | m_IsUpdatingScrollbarValues = false |
| |
|
bool | m_isLastKeyBackspace = false |
| |
|
float | m_ClickStartTime |
| |
|
float | m_DoubleClickDelay = 0.5f |
| |
|
const string | kEmailSpecialCharacters = "!#$%&'*+-/=?^_`{|}~" |
| |
|
bool | m_RestoreOriginalTextOnEscape = true |
| |
|
bool | m_isSelected |
| |
|
bool | isStringPositionDirty |
| |
|
bool | m_forceRectTransformAdjustment |
| |
| Event | m_ProcessingEvent = new Event() |
| | Handle the specified event. More...
|
| |
Editable text input field.
Definition at line 21 of file TMP_InputField.cs.