C# Class UITextField, marblemadness

Inheritance: AutoSpriteControlBase, IKeyFocusable
Afficher le fichier Open project: MtvnGames/marblemadness Class Usage Examples

Méthodes publiques

Свойство Type Description
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 Properties

Свойство Type Description
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[

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
Awake ( ) : void
CreateCaret ( ) : void
HideCaret ( ) : void
PositionCaret ( ) : void
PositionCaret ( bool recur ) : void
PositionInsertionPoint ( Vector3 pt ) : void
PositionText ( bool recur ) : void
ShowCaret ( ) : void

Method Details

AddCommitDelegate() public méthode

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.
Résultat void

AddFocusDelegate() public méthode

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.
Résultat void

Awake() protected méthode

protected Awake ( ) : void
Résultat void

CalcClippingRect() public méthode

public CalcClippingRect ( ) : void
Résultat void

Commit() public méthode

public Commit ( ) : void
Résultat void

Copy() public méthode

public Copy ( SpriteRoot, s ) : void
s SpriteRoot,
Résultat void

Copy() public méthode

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
Résultat void

Create() static public méthode

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.
Résultat UITextField,

Create() static public méthode

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.
Résultat UITextField,

CreateCaret() protected méthode

protected CreateCaret ( ) : void
Résultat void

DoMirror() public méthode

public DoMirror ( ) : void
Résultat void

DrawPreTransitionUI() public méthode

public DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
selState int
gui IGUIScriptSelector
Résultat void

GetInputText() public méthode

public GetInputText ( KEYBOARD_INFO, &info ) : string
info KEYBOARD_INFO,
Résultat string

GetTransitions() public méthode

public GetTransitions ( int index ) : EZTransitionList
index int
Résultat EZTransitionList

GotFocus() public méthode

public GotFocus ( ) : bool
Résultat bool

Hide() public méthode

public Hide ( bool tf ) : void
tf bool
Résultat void

HideCaret() protected méthode

protected HideCaret ( ) : void
Résultat void

InitUVs() public méthode

public InitUVs ( ) : void
Résultat void

LostFocus() public méthode

public LostFocus ( ) : void
Résultat void

OnDrawGizmosSelected() public méthode

public OnDrawGizmosSelected ( ) : void
Résultat void

OnEZRotated() public méthode

public OnEZRotated ( ) : void
Résultat void

OnEZScaled() public méthode

public OnEZScaled ( ) : void
Résultat void

OnEZTranslated() public méthode

public OnEZTranslated ( ) : void
Résultat void

OnInput() public méthode

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
Résultat void

PositionCaret() protected méthode

protected PositionCaret ( ) : void
Résultat void

PositionCaret() protected méthode

protected PositionCaret ( bool recur ) : void
recur bool
Résultat void

PositionInsertionPoint() protected méthode

protected PositionInsertionPoint ( Vector3 pt ) : void
pt Vector3
Résultat void

PositionText() protected méthode

protected PositionText ( bool recur ) : void
recur bool
Résultat void

RemoveCommitDelegate() public méthode

Removes a delegate previously added or set by AddCommitDelegate() or SetCommitDelegate().
public RemoveCommitDelegate ( EZKeyboardCommitDelegate del ) : void
del EZKeyboardCommitDelegate The delegate to be removed.
Résultat void

RemoveFocusDelegate() public méthode

Removes a delegate previously added or set by AddFocusDelegate() or SetFocusDelegate().
public RemoveFocusDelegate ( FocusDelegate del ) : void
del FocusDelegate The delegate to be removed.
Résultat void

SetCommitDelegate() public méthode

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.
Résultat void

SetFocusDelegate() public méthode

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.
Résultat void

SetInputText() public méthode

public SetInputText ( string inputText, int &insertPt ) : string
inputText string
insertPt int
Résultat string

SetMargins() public méthode

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.
Résultat void

ShowCaret() protected méthode

protected ShowCaret ( ) : void
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Unclip() public méthode

public Unclip ( ) : void
Résultat void

Property Details

alert public_oe property

Whether the keyboard should be shown in alert mode. (iPhone OS only)
public bool alert
Résultat bool

allowClickCaretPlacement public_oe property

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
Résultat bool

autoCorrect public_oe property

Whether to use auto correction. (iPhone OS only)
public bool autoCorrect
Résultat bool

cachedPos protected_oe property

protected Vector3 cachedPos
Résultat Vector3

cachedRot protected_oe property

protected Quaternion cachedRot
Résultat Quaternion

cachedScale protected_oe property

protected Vector3 cachedScale
Résultat Vector3

caret protected_oe property

protected AutoSprite, caret
Résultat AutoSprite,

caretAnchor public_oe property

The anchor method to be used by the caret.
public SpriteRoot.ANCHOR_METHOD caretAnchor
Résultat SpriteRoot.ANCHOR_METHOD

caretOffset public_oe property

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
Résultat Vector3

caretSize public_oe property

The size, in local units, of the caret sprite. This can be left at default if using pixel-perfect.
public Vector2 caretSize
Résultat Vector2

clientClippingRect protected_oe property

protected Rect3D clientClippingRect
Résultat Rect3D

commitDelegate protected_oe property

protected EZKeyboardCommitDelegate commitDelegate
Résultat EZKeyboardCommitDelegate

commitOnLostFocus public_oe property

When set to true, the commit delegate/method to invoke will be called when the field loses focus.
public bool commitOnLostFocus
Résultat bool

customFocusEvent public_oe property

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
Résultat POINTER_INFO.INPUT_EVENT

customKeyboard public_oe property

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
Résultat bool

fieldFullSound public_oe property

Sound to play if typing has exceeded the field's length.
public AudioSource,UnityEngine fieldFullSound
Résultat UnityEngine.AudioSource

focusDelegate protected_oe property

protected FocusDelegate focusDelegate
Résultat FocusDelegate

hasFocus protected_oe property

protected bool hasFocus
Résultat bool

hideInput public_oe property

Specifies if text input field above the keyboard will be hidden when the keyboard is on screen.
public bool hideInput
Résultat bool

insert protected_oe property

protected int insert
Résultat int

marginBottomRight protected_oe property

protected Vector2 marginBottomRight
Résultat Vector2

marginTopLeft protected_oe property

protected Vector2 marginTopLeft
Résultat Vector2

margins public_oe property

The distance, in local units, inward from the edges of the control that the text should be clipped.
public Vector2 margins
Résultat Vector2

maskingCharacter public_oe property

Holds the character to be used to mask password text. Defaults to asterisk (*).
public string maskingCharacter
Résultat string

maxLength public_oe property

The maximum number of characters the field can hold. A value of 0 is unlimited.
public int maxLength
Résultat int

maxLengthExceeded protected_oe property

protected bool maxLengthExceeded
Résultat bool

methodToInvoke public_oe property

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
Résultat string

multiline public_oe property

Whether or not this field will accept multi-line input.
public bool multiline
Résultat bool

origTextPos protected_oe property

protected Vector3 origTextPos
Résultat Vector3

password public_oe property

When set to true, all text in this control will be masked using the specified maskingCharacter.
public bool password
Résultat bool

scriptWithMethodToInvoke public_oe property

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
Résultat MonoBehaviour

showCaretOnMobile public_oe property

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
Résultat bool

stateIndices protected_oe property

protected int[,] stateIndices
Résultat ].int[

type public_oe property

The type of keyboard to display. (iPhone OS only)
public iPhoneKeyboardType type
Résultat iPhoneKeyboardType

typingSoundEffect public_oe property

Sound that will be played when the field receives keyboard input
public AudioSource,UnityEngine typingSoundEffect
Résultat UnityEngine.AudioSource