C# Класс UITextField, marblemadness

Наследование: AutoSpriteControlBase, IKeyFocusable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
alert bool
allowClickCaretPlacement bool
autoCorrect bool
caretAnchor SpriteRoot.ANCHOR_METHOD
caretOffset Vector3
caretSize Vector2
commitOnLostFocus bool
customFocusEvent POINTER_INFO.INPUT_EVENT
customKeyboard bool
fieldFullSound UnityEngine.AudioSource
hideInput bool
margins Vector2
maskingCharacter string
maxLength int
methodToInvoke string
multiline bool
password bool
scriptWithMethodToInvoke MonoBehaviour
showCaretOnMobile bool
type iPhoneKeyboardType
typingSoundEffect UnityEngine.AudioSource

Защищенные свойства (Protected)

Свойство Тип Описание
cachedPos Vector3
cachedRot Quaternion
cachedScale Vector3
caret AutoSprite,
clientClippingRect Rect3D
commitDelegate EZKeyboardCommitDelegate
focusDelegate FocusDelegate
hasFocus bool
insert int
marginBottomRight Vector2
marginTopLeft Vector2
maxLengthExceeded bool
origTextPos Vector3
stateIndices ].int[

Открытые методы

Метод Описание
AddCommitDelegate ( EZKeyboardCommitDelegate del ) : void

Adds a delegate to be called when the content of the field is "committed" (when the return key is pressed on a single-line field, or when the "Done" button is pressed on an iOS keyboard).

AddFocusDelegate ( FocusDelegate del ) : void

Adds a delegate to be called when the field receives the focus as determined by the customFocusEvent setting.

CalcClippingRect ( ) : void
Commit ( ) : void
Copy ( SpriteRoot, s ) : void
Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
Create ( string name, Vector3 pos ) : UITextField,

Creates a GameObject and attaches this component type to it.

Create ( string name, Vector3 pos, Quaternion rotation ) : UITextField,

Creates a GameObject and attaches this component type to it.

DoMirror ( ) : void
DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
GetInputText ( KEYBOARD_INFO, &info ) : string
GetTransitions ( int index ) : EZTransitionList
GotFocus ( ) : bool
Hide ( bool tf ) : void
InitUVs ( ) : void
LostFocus ( ) : void
OnDrawGizmosSelected ( ) : void
OnEZRotated ( ) : void
OnEZScaled ( ) : void
OnEZTranslated ( ) : void
OnInput ( POINTER_INFO, &ptr ) : void
RemoveCommitDelegate ( EZKeyboardCommitDelegate del ) : void

Removes a delegate previously added or set by AddCommitDelegate() or SetCommitDelegate().

RemoveFocusDelegate ( FocusDelegate del ) : void

Removes a delegate previously added or set by AddFocusDelegate() or SetFocusDelegate().

SetCommitDelegate ( EZKeyboardCommitDelegate del ) : void

Sets the delegate to be called when the content of the field is "committed" (when the return key is pressed on a single-line field, or when the "Done" button is pressed on an iOS keyboard). NOTE: This will unset any previously assigned commit delegate.

SetFocusDelegate ( FocusDelegate del ) : void

Sets the delegate to be called when the field receives the focus as determined by the customFocusEvent setting. NOTE: This will unset any previously assigned focus delegate.

SetInputText ( string inputText, int &insertPt ) : string
SetMargins ( Vector2 marg ) : void

Sets the margins to the specified values.

Start ( ) : void
Unclip ( ) : void

Защищенные методы

Метод Описание
Awake ( ) : void
CreateCaret ( ) : void
HideCaret ( ) : void
PositionCaret ( ) : void
PositionCaret ( bool recur ) : void
PositionInsertionPoint ( Vector3 pt ) : void
PositionText ( bool recur ) : void
ShowCaret ( ) : void

Описание методов

AddCommitDelegate() публичный Метод

Adds a delegate to be called when the content of the field is "committed" (when the return key is pressed on a single-line field, or when the "Done" button is pressed on an iOS keyboard).
public AddCommitDelegate ( EZKeyboardCommitDelegate del ) : void
del EZKeyboardCommitDelegate The delegate to be called.
Результат void

AddFocusDelegate() публичный Метод

Adds a delegate to be called when the field receives the focus as determined by the customFocusEvent setting.
public AddFocusDelegate ( FocusDelegate del ) : void
del FocusDelegate The delegate to be called.
Результат void

Awake() защищенный Метод

protected Awake ( ) : void
Результат void

CalcClippingRect() публичный Метод

public CalcClippingRect ( ) : void
Результат void

Commit() публичный Метод

public Commit ( ) : void
Результат void

Copy() публичный Метод

public Copy ( SpriteRoot, s ) : void
s SpriteRoot,
Результат void

Copy() публичный Метод

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
Результат void

Create() статический публичный Метод

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : UITextField,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
Результат UITextField,

Create() статический публичный Метод

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : UITextField,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
rotation Quaternion Rotation of the object.
Результат UITextField,

CreateCaret() защищенный Метод

protected CreateCaret ( ) : void
Результат void

DoMirror() публичный Метод

public DoMirror ( ) : void
Результат void

DrawPreTransitionUI() публичный Метод

public DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
selState int
gui IGUIScriptSelector
Результат void

GetInputText() публичный Метод

public GetInputText ( KEYBOARD_INFO, &info ) : string
info KEYBOARD_INFO,
Результат string

GetTransitions() публичный Метод

public GetTransitions ( int index ) : EZTransitionList
index int
Результат EZTransitionList

GotFocus() публичный Метод

public GotFocus ( ) : bool
Результат bool

Hide() публичный Метод

public Hide ( bool tf ) : void
tf bool
Результат void

HideCaret() защищенный Метод

protected HideCaret ( ) : void
Результат void

InitUVs() публичный Метод

public InitUVs ( ) : void
Результат void

LostFocus() публичный Метод

public LostFocus ( ) : void
Результат void

OnDrawGizmosSelected() публичный Метод

public OnDrawGizmosSelected ( ) : void
Результат void

OnEZRotated() публичный Метод

public OnEZRotated ( ) : void
Результат void

OnEZScaled() публичный Метод

public OnEZScaled ( ) : void
Результат void

OnEZTranslated() публичный Метод

public OnEZTranslated ( ) : void
Результат void

OnInput() публичный Метод

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
Результат void

PositionCaret() защищенный Метод

protected PositionCaret ( ) : void
Результат void

PositionCaret() защищенный Метод

protected PositionCaret ( bool recur ) : void
recur bool
Результат void

PositionInsertionPoint() защищенный Метод

protected PositionInsertionPoint ( Vector3 pt ) : void
pt Vector3
Результат void

PositionText() защищенный Метод

protected PositionText ( bool recur ) : void
recur bool
Результат void

RemoveCommitDelegate() публичный Метод

Removes a delegate previously added or set by AddCommitDelegate() or SetCommitDelegate().
public RemoveCommitDelegate ( EZKeyboardCommitDelegate del ) : void
del EZKeyboardCommitDelegate The delegate to be removed.
Результат void

RemoveFocusDelegate() публичный Метод

Removes a delegate previously added or set by AddFocusDelegate() or SetFocusDelegate().
public RemoveFocusDelegate ( FocusDelegate del ) : void
del FocusDelegate The delegate to be removed.
Результат void

SetCommitDelegate() публичный Метод

Sets the delegate to be called when the content of the field is "committed" (when the return key is pressed on a single-line field, or when the "Done" button is pressed on an iOS keyboard). NOTE: This will unset any previously assigned commit delegate.
public SetCommitDelegate ( EZKeyboardCommitDelegate del ) : void
del EZKeyboardCommitDelegate The delegate to be called.
Результат void

SetFocusDelegate() публичный Метод

Sets the delegate to be called when the field receives the focus as determined by the customFocusEvent setting. NOTE: This will unset any previously assigned focus delegate.
public SetFocusDelegate ( FocusDelegate del ) : void
del FocusDelegate The delegate to be called.
Результат void

SetInputText() публичный Метод

public SetInputText ( string inputText, int &insertPt ) : string
inputText string
insertPt int
Результат string

SetMargins() публичный Метод

Sets the margins to the specified values.
public SetMargins ( Vector2 marg ) : void
marg Vector2 The distance, in local units, in from the edges of /// the control where the text within should be clipped.
Результат void

ShowCaret() защищенный Метод

protected ShowCaret ( ) : void
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Unclip() публичный Метод

public Unclip ( ) : void
Результат void

Описание свойств

alert публичное свойство

Whether the keyboard should be shown in alert mode. (iPhone OS only)
public bool alert
Результат bool

allowClickCaretPlacement публичное свойство

When true, the caret/insertion point is moved to the position clicked by the user. This is ignored if there is no caret, or if the platform is a mobile device which does not support programmatic placement of the insertion point.
public bool allowClickCaretPlacement
Результат bool

autoCorrect публичное свойство

Whether to use auto correction. (iPhone OS only)
public bool autoCorrect
Результат bool

cachedPos защищенное свойство

protected Vector3 cachedPos
Результат Vector3

cachedRot защищенное свойство

protected Quaternion cachedRot
Результат Quaternion

cachedScale защищенное свойство

protected Vector3 cachedScale
Результат Vector3

caret защищенное свойство

protected AutoSprite, caret
Результат AutoSprite,

caretAnchor публичное свойство

The anchor method to be used by the caret.
public SpriteRoot.ANCHOR_METHOD caretAnchor
Результат SpriteRoot.ANCHOR_METHOD

caretOffset публичное свойство

The distance, in local units, that the caret will be offset from the insertion point. Defaults to 0,0,-0.1 to keep it from being hidden "behind" the text.
public Vector3 caretOffset
Результат Vector3

caretSize публичное свойство

The size, in local units, of the caret sprite. This can be left at default if using pixel-perfect.
public Vector2 caretSize
Результат Vector2

clientClippingRect защищенное свойство

protected Rect3D clientClippingRect
Результат Rect3D

commitDelegate защищенное свойство

protected EZKeyboardCommitDelegate commitDelegate
Результат EZKeyboardCommitDelegate

commitOnLostFocus публичное свойство

When set to true, the commit delegate/method to invoke will be called when the field loses focus.
public bool commitOnLostFocus
Результат bool

customFocusEvent публичное свойство

Event that should trigger a custom focus event, if using your own custom input method (not using a hardware or OS-provided keyboard). Otherwise, this setting has no effect.
public POINTER_INFO.INPUT_EVENT customFocusEvent
Результат POINTER_INFO.INPUT_EVENT

customKeyboard публичное свойство

When true, the field will not accept input from the hardware or OS-provided keyboard, and instead must be operated using a custom keyboard provided by you.
public bool customKeyboard
Результат bool

fieldFullSound публичное свойство

Sound to play if typing has exceeded the field's length.
public AudioSource,UnityEngine fieldFullSound
Результат UnityEngine.AudioSource

focusDelegate защищенное свойство

protected FocusDelegate focusDelegate
Результат FocusDelegate

hasFocus защищенное свойство

protected bool hasFocus
Результат bool

hideInput публичное свойство

Specifies if text input field above the keyboard will be hidden when the keyboard is on screen.
public bool hideInput
Результат bool

insert защищенное свойство

protected int insert
Результат int

marginBottomRight защищенное свойство

protected Vector2 marginBottomRight
Результат Vector2

marginTopLeft защищенное свойство

protected Vector2 marginTopLeft
Результат Vector2

margins публичное свойство

The distance, in local units, inward from the edges of the control that the text should be clipped.
public Vector2 margins
Результат Vector2

maskingCharacter публичное свойство

Holds the character to be used to mask password text. Defaults to asterisk (*).
public string maskingCharacter
Результат string

maxLength публичное свойство

The maximum number of characters the field can hold. A value of 0 is unlimited.
public int maxLength
Результат int

maxLengthExceeded защищенное свойство

protected bool maxLengthExceeded
Результат bool

methodToInvoke публичное свойство

A string containing the name of the method to be invoked when enter is pressed (if single-line), or when "Done" is pressed on the iOS keyboard.
public string methodToInvoke
Результат string

multiline публичное свойство

Whether or not this field will accept multi-line input.
public bool multiline
Результат bool

origTextPos защищенное свойство

protected Vector3 origTextPos
Результат Vector3

password публичное свойство

When set to true, all text in this control will be masked using the specified maskingCharacter.
public bool password
Результат bool

scriptWithMethodToInvoke публичное свойство

Reference to the script component with the method you wish to invoke when enter is pressed (if single-line), or when "Done" is pressed on the iOS keyboard.
public MonoBehaviour scriptWithMethodToInvoke
Результат MonoBehaviour

showCaretOnMobile публичное свойство

Sets whether a caret should be shown when running on a mobile device (such as iOS). It is recommended to keep this set to false since, for example, the keyboard on iOS has its own method of setting the insertion point, and Unity does not expose information about this insertion point, so if the EZ GUI caret is shown, there is no way for it to stay in sync with where the insertion point actually is because Unity does not pass that information through. So it is better to just leave the caret disabled for mobile devices and let the user use the built-in OS-specific text entry interface.
public bool showCaretOnMobile
Результат bool

stateIndices защищенное свойство

protected int[,] stateIndices
Результат ].int[

type публичное свойство

The type of keyboard to display. (iPhone OS only)
public iPhoneKeyboardType type
Результат iPhoneKeyboardType

typingSoundEffect публичное свойство

Sound that will be played when the field receives keyboard input
public AudioSource,UnityEngine typingSoundEffect
Результат UnityEngine.AudioSource