Class TMP_InputField
Inheritance
Object
Component
Behaviour
MonoBehaviour
UIBehaviour
Selectable
TMP_InputField
Implements
IMoveHandler
IPointerDownHandler
IPointerUpHandler
IPointerEnterHandler
IPointerExitHandler
ISelectHandler
IDeselectHandler
IUpdateSelectedHandler
IBeginDragHandler
IDragHandler
IEndDragHandler
IPointerClickHandler
ISubmitHandler
ICanvasElement
IScrollHandler
IEventSystemHandler
Inherited Members
Selectable.s_Selectables
Selectable.s_SelectableCount
Selectable.m_CurrentIndex
Selectable.AllSelectablesNoAlloc(Selectable[])
Selectable.Awake()
Selectable.OnCanvasGroupChanged()
Selectable.IsInteractable()
Selectable.OnDidApplyAnimationProperties()
Selectable.OnTransformParentChanged()
Selectable.OnValidate()
Selectable.Reset()
Selectable.InstantClearState()
Selectable.FindSelectable(Vector3)
Selectable.FindSelectableOnLeft()
Selectable.FindSelectableOnRight()
Selectable.FindSelectableOnUp()
Selectable.FindSelectableOnDown()
Selectable.OnMove(AxisEventData)
Selectable.IsHighlighted()
Selectable.IsPressed()
Selectable.OnPointerUp(PointerEventData)
Selectable.OnPointerEnter(PointerEventData)
Selectable.OnPointerExit(PointerEventData)
Selectable.Select()
Selectable.allSelectablesArray
Selectable.allSelectableCount
Selectable.allSelectables
Selectable.navigation
Selectable.transition
Selectable.colors
Selectable.spriteState
Selectable.animationTriggers
Selectable.targetGraphic
Selectable.interactable
Selectable.image
Selectable.animator
Selectable.currentSelectionState
UIBehaviour.Start()
UIBehaviour.OnDestroy()
UIBehaviour.IsActive()
UIBehaviour.OnRectTransformDimensionsChange()
UIBehaviour.OnBeforeTransformParentChanged()
UIBehaviour.OnCanvasHierarchyChanged()
UIBehaviour.IsDestroyed()
Namespace: TMPro
Assembly: HollowKnight.dll
[AddComponentMenu("UI/TextMeshPro - Input Field", 11)]
public class TMP_InputField : Selectable, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IUpdateSelectedHandler, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerClickHandler, ISubmitHandler, ICanvasElement, IScrollHandler, IEventSystemHandler
Constructors
|
Edit this page
View Source
Declaration
protected TMP_InputField()
Fields
|
Edit this page
View Source
Declaration
protected int m_CaretPosition
Field Value
|
Edit this page
View Source
Declaration
protected int m_CaretSelectPosition
Field Value
|
Edit this page
View Source
Declaration
protected bool m_CaretVisible
Field Value
|
Edit this page
View Source
Declaration
protected UIVertex[] m_CursorVerts
Field Value
Type |
Description |
UIVertex[] |
|
|
Edit this page
View Source
Declaration
[SerializeField]
protected TMP_FontAsset m_GlobalFontAsset
Field Value
|
Edit this page
View Source
Declaration
[SerializeField]
protected TMP_InputValidator m_InputValidator
Field Value
|
Edit this page
View Source
Declaration
protected TouchScreenKeyboard m_Keyboard
Field Value
Type |
Description |
TouchScreenKeyboard |
|
|
Edit this page
View Source
Declaration
[NonSerialized]
protected Mesh m_Mesh
Field Value
|
Edit this page
View Source
Declaration
[SerializeField]
protected bool m_OnFocusSelectAll
Field Value
|
Edit this page
View Source
Declaration
[SerializeField]
protected Graphic m_Placeholder
Field Value
|
Edit this page
View Source
Declaration
[SerializeField]
protected bool m_ResetOnDeActivation
Field Value
|
Edit this page
View Source
Declaration
[SerializeField]
protected float m_ScrollSensitivity
Field Value
|
Edit this page
View Source
Declaration
protected int m_StringPosition
Field Value
|
Edit this page
View Source
Declaration
protected int m_StringSelectPosition
Field Value
|
Edit this page
View Source
m_Text
Declaration
[SerializeField]
protected string m_Text
Field Value
|
Edit this page
View Source
m_TextComponent
Declaration
[SerializeField]
protected TMP_Text m_TextComponent
Field Value
|
Edit this page
View Source
m_TextComponentRectTransform
Declaration
protected RectTransform m_TextComponentRectTransform
Field Value
Type |
Description |
RectTransform |
|
|
Edit this page
View Source
m_TextViewport
Declaration
[SerializeField]
protected RectTransform m_TextViewport
Field Value
Type |
Description |
RectTransform |
|
|
Edit this page
View Source
Declaration
[SerializeField]
protected Scrollbar m_VerticalScrollbar
Field Value
Type |
Description |
Scrollbar |
|
|
Edit this page
View Source
Declaration
[SerializeField]
protected TMP_ScrollbarEventHandler m_VerticalScrollbarEventHandler
Field Value
|
Edit this page
View Source
m_isRichTextEditingAllowed
Declaration
[SerializeField]
protected bool m_isRichTextEditingAllowed
Field Value
|
Edit this page
View Source
Declaration
protected bool m_isSelectAll
Field Value
Properties
|
Edit this page
View Source
Declaration
public char asteriskChar { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public float caretBlinkRate { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public Color caretColor { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int caretPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
protected int caretPositionInternal { get; set; }
Property Value
|
Edit this page
View Source
Declaration
protected int caretSelectPositionInternal { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int caretWidth { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int characterLimit { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.CharacterValidation characterValidation { get; set; }
Property Value
|
Edit this page
View Source
contentType
Declaration
public TMP_InputField.ContentType contentType { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool customCaretColor { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_FontAsset fontAsset { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.InputType inputType { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputValidator inputValidator { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool isFocused { get; }
Property Value
|
Edit this page
View Source
isRichTextEditingAllowed
Declaration
public bool isRichTextEditingAllowed { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TouchScreenKeyboardType keyboardType { get; set; }
Property Value
Type |
Description |
TouchScreenKeyboardType |
|
|
Edit this page
View Source
Declaration
public TMP_InputField.LineType lineType { get; set; }
Property Value
|
Edit this page
View Source
Declaration
protected Mesh mesh { get; }
Property Value
|
Edit this page
View Source
Declaration
public bool multiLine { get; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.SelectionEvent onDeselect { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.SubmitEvent onEndEdit { get; set; }
Property Value
|
Edit this page
View Source
onEndTextSelection
Declaration
public TMP_InputField.TextSelectionEvent onEndTextSelection { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool onFocusSelectAll { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.SelectionEvent onSelect { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.SubmitEvent onSubmit { get; set; }
Property Value
|
Edit this page
View Source
onTextSelection
Declaration
public TMP_InputField.TextSelectionEvent onTextSelection { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.OnValidateInput onValidateInput { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public TMP_InputField.OnChangeEvent onValueChanged { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public Graphic placeholder { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public float pointSize { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool readOnly { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool resetOnDeActivation { get; set; }
Property Value
|
Edit this page
View Source
restoreOriginalTextOnEscape
Declaration
public bool restoreOriginalTextOnEscape { get; set; }
Property Value
|
Edit this page
View Source
richText
Declaration
public bool richText { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public float scrollSensitivity { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int selectionAnchorPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public Color selectionColor { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int selectionFocusPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int selectionStringAnchorPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int selectionStringFocusPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public bool shouldHideMobileInput { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public int stringPosition { get; set; }
Property Value
|
Edit this page
View Source
Declaration
protected int stringPositionInternal { get; set; }
Property Value
|
Edit this page
View Source
Declaration
protected int stringSelectPositionInternal { get; set; }
Property Value
|
Edit this page
View Source
text
Declaration
public string text { get; set; }
Property Value
|
Edit this page
View Source
textComponent
Declaration
public TMP_Text textComponent { get; set; }
Property Value
|
Edit this page
View Source
textViewport
Declaration
public RectTransform textViewport { get; set; }
Property Value
Type |
Description |
RectTransform |
|
|
Edit this page
View Source
Declaration
public Scrollbar verticalScrollbar { get; set; }
Property Value
Type |
Description |
Scrollbar |
|
|
Edit this page
View Source
Declaration
public bool wasCanceled { get; }
Property Value
Methods
|
Edit this page
View Source
Declaration
public void ActivateInputField()
|
Edit this page
View Source
Declaration
protected virtual void Append(char input)
Parameters
Type |
Name |
Description |
char |
input |
|
|
Edit this page
View Source
Declaration
protected virtual void Append(string input)
Parameters
Type |
Name |
Description |
string |
input |
|
|
Edit this page
View Source
Declaration
protected void ClampCaretPos(ref int pos)
Parameters
Type |
Name |
Description |
int |
pos |
|
|
Edit this page
View Source
Declaration
protected void ClampStringPos(ref int pos)
Parameters
Type |
Name |
Description |
int |
pos |
|
|
Edit this page
View Source
Declaration
public void DeactivateInputField()
|
Edit this page
View Source
Declaration
protected override void DoStateTransition(Selectable.SelectionState state, bool instant)
Parameters
Type |
Name |
Description |
Selectable.SelectionState |
state |
|
bool |
instant |
|
Overrides
|
Edit this page
View Source
Declaration
public void ForceLabelUpdate()
|
Edit this page
View Source
Declaration
public virtual void GraphicUpdateComplete()
|
Edit this page
View Source
Declaration
protected TMP_InputField.EditState KeyPressed(Event evt)
Parameters
Type |
Name |
Description |
Event |
evt |
|
Returns
|
Edit this page
View Source
Declaration
protected virtual void LateUpdate()
|
Edit this page
View Source
Declaration
public virtual void LayoutComplete()
|
Edit this page
View Source
MoveTextEnd(bool)
Declaration
public void MoveTextEnd(bool shift)
Parameters
Type |
Name |
Description |
bool |
shift |
|
|
Edit this page
View Source
MoveTextStart(bool)
Declaration
public void MoveTextStart(bool shift)
Parameters
Type |
Name |
Description |
bool |
shift |
|
|
Edit this page
View Source
Declaration
public void MoveToEndOfLine(bool shift, bool ctrl)
Parameters
Type |
Name |
Description |
bool |
shift |
|
bool |
ctrl |
|
|
Edit this page
View Source
Declaration
public void MoveToStartOfLine(bool shift, bool ctrl)
Parameters
Type |
Name |
Description |
bool |
shift |
|
bool |
ctrl |
|
|
Edit this page
View Source
Declaration
public virtual void OnBeginDrag(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Edit this page
View Source
Declaration
public void OnControlClick()
|
Edit this page
View Source
Declaration
public override void OnDeselect(BaseEventData eventData)
Parameters
Type |
Name |
Description |
BaseEventData |
eventData |
|
Overrides
UnityEngine.UI.Selectable.OnDeselect(UnityEngine.EventSystems.BaseEventData)
|
Edit this page
View Source
Declaration
protected override void OnDisable()
Overrides
UnityEngine.UI.Selectable.OnDisable()
|
Edit this page
View Source
Declaration
public virtual void OnDrag(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Edit this page
View Source
Declaration
protected override void OnEnable()
Overrides
UnityEngine.UI.Selectable.OnEnable()
|
Edit this page
View Source
Declaration
public virtual void OnEndDrag(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration
public virtual void OnPointerClick(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Edit this page
View Source
Declaration
public override void OnPointerDown(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
Overrides
UnityEngine.UI.Selectable.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
|
Edit this page
View Source
Declaration
public virtual void OnScroll(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Edit this page
View Source
Declaration
public override void OnSelect(BaseEventData eventData)
Parameters
Type |
Name |
Description |
BaseEventData |
eventData |
|
Overrides
UnityEngine.UI.Selectable.OnSelect(UnityEngine.EventSystems.BaseEventData)
|
Edit this page
View Source
Declaration
public virtual void OnSubmit(BaseEventData eventData)
Parameters
Type |
Name |
Description |
BaseEventData |
eventData |
|
|
Edit this page
View Source
Declaration
public virtual void OnUpdateSelected(BaseEventData eventData)
Parameters
Type |
Name |
Description |
BaseEventData |
eventData |
|
|
Edit this page
View Source
Declaration
public void ProcessEvent(Event e)
Parameters
Type |
Name |
Description |
Event |
e |
|
|
Edit this page
View Source
Declaration
public virtual void Rebuild(CanvasUpdate update)
Parameters
Type |
Name |
Description |
CanvasUpdate |
update |
|
|
Edit this page
View Source
Declaration
protected void SelectAll()
|
Edit this page
View Source
Declaration
protected void SendOnEndEdit()
|
Edit this page
View Source
SendOnEndTextSelection()
Declaration
protected void SendOnEndTextSelection()
|
Edit this page
View Source
Declaration
protected void SendOnFocus()
|
Edit this page
View Source
Declaration
protected void SendOnFocusLost()
|
Edit this page
View Source
Declaration
protected void SendOnSubmit()
|
Edit this page
View Source
SendOnTextSelection()
Declaration
protected void SendOnTextSelection()
|
Edit this page
View Source
Declaration
public void SetGlobalFontAsset(TMP_FontAsset fontAsset)
Parameters
|
Edit this page
View Source
Declaration
public void SetGlobalPointSize(float pointSize)
Parameters
Type |
Name |
Description |
float |
pointSize |
|
|
Edit this page
View Source
Declaration
protected void UpdateLabel()
|
Edit this page
View Source
Declaration
protected char Validate(string text, int pos, char ch)
Parameters
Returns
Implements
UnityEngine.EventSystems.IMoveHandler
UnityEngine.EventSystems.IPointerDownHandler
UnityEngine.EventSystems.IPointerUpHandler
UnityEngine.EventSystems.IPointerEnterHandler
UnityEngine.EventSystems.IPointerExitHandler
UnityEngine.EventSystems.ISelectHandler
UnityEngine.EventSystems.IDeselectHandler
UnityEngine.EventSystems.IUpdateSelectedHandler
UnityEngine.EventSystems.IBeginDragHandler
UnityEngine.EventSystems.IDragHandler
UnityEngine.EventSystems.IEndDragHandler
UnityEngine.EventSystems.IPointerClickHandler
UnityEngine.EventSystems.ISubmitHandler
UnityEngine.UI.ICanvasElement
UnityEngine.EventSystems.IScrollHandler
UnityEngine.EventSystems.IEventSystemHandler
Extension Methods