C# Class UITextField, marblemadness

Inheritance: AutoSpriteControlBase, IKeyFocusable
Mostrar archivo Open project: MtvnGames/marblemadness Class Usage Examples

Public Properties

Property 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

Property 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[

Public Methods

Method 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

Protected Methods

Method 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 method

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.
return void

AddFocusDelegate() public method

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.
return void

Awake() protected method

protected Awake ( ) : void
return void

CalcClippingRect() public method

public CalcClippingRect ( ) : void
return void

Commit() public method

public Commit ( ) : void
return void

Copy() public method

public Copy ( SpriteRoot, s ) : void
s SpriteRoot,
return void

Copy() public method

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
return void

Create() static public method

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.
return UITextField,

Create() static public method

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.
return UITextField,

CreateCaret() protected method

protected CreateCaret ( ) : void
return void

DoMirror() public method

public DoMirror ( ) : void
return void

DrawPreTransitionUI() public method

public DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
selState int
gui IGUIScriptSelector
return void

GetInputText() public method

public GetInputText ( KEYBOARD_INFO, &info ) : string
info KEYBOARD_INFO,
return string

GetTransitions() public method

public GetTransitions ( int index ) : EZTransitionList
index int
return EZTransitionList

GotFocus() public method

public GotFocus ( ) : bool
return bool

Hide() public method

public Hide ( bool tf ) : void
tf bool
return void

HideCaret() protected method

protected HideCaret ( ) : void
return void

InitUVs() public method

public InitUVs ( ) : void
return void

LostFocus() public method

public LostFocus ( ) : void
return void

OnDrawGizmosSelected() public method

public OnDrawGizmosSelected ( ) : void
return void

OnEZRotated() public method

public OnEZRotated ( ) : void
return void

OnEZScaled() public method

public OnEZScaled ( ) : void
return void

OnEZTranslated() public method

public OnEZTranslated ( ) : void
return void

OnInput() public method

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
return void

PositionCaret() protected method

protected PositionCaret ( ) : void
return void

PositionCaret() protected method

protected PositionCaret ( bool recur ) : void
recur bool
return void

PositionInsertionPoint() protected method

protected PositionInsertionPoint ( Vector3 pt ) : void
pt Vector3
return void

PositionText() protected method

protected PositionText ( bool recur ) : void
recur bool
return void

RemoveCommitDelegate() public method

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

RemoveFocusDelegate() public method

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

SetCommitDelegate() public method

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.
return void

SetFocusDelegate() public method

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.
return void

SetInputText() public method

public SetInputText ( string inputText, int &insertPt ) : string
inputText string
insertPt int
return string

SetMargins() public method

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.
return void

ShowCaret() protected method

protected ShowCaret ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Unclip() public method

public Unclip ( ) : void
return void

Property Details

alert public_oe property

Whether the keyboard should be shown in alert mode. (iPhone OS only)
public bool alert
return 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
return bool

autoCorrect public_oe property

Whether to use auto correction. (iPhone OS only)
public bool autoCorrect
return bool

cachedPos protected_oe property

protected Vector3 cachedPos
return Vector3

cachedRot protected_oe property

protected Quaternion cachedRot
return Quaternion

cachedScale protected_oe property

protected Vector3 cachedScale
return Vector3

caret protected_oe property

protected AutoSprite, caret
return AutoSprite,

caretAnchor public_oe property

The anchor method to be used by the caret.
public SpriteRoot.ANCHOR_METHOD caretAnchor
return 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
return 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
return Vector2

clientClippingRect protected_oe property

protected Rect3D clientClippingRect
return Rect3D

commitDelegate protected_oe property

protected EZKeyboardCommitDelegate commitDelegate
return 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
return 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
return 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
return bool

fieldFullSound public_oe property

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

focusDelegate protected_oe property

protected FocusDelegate focusDelegate
return FocusDelegate

hasFocus protected_oe property

protected bool hasFocus
return 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
return bool

insert protected_oe property

protected int insert
return int

marginBottomRight protected_oe property

protected Vector2 marginBottomRight
return Vector2

marginTopLeft protected_oe property

protected Vector2 marginTopLeft
return 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
return Vector2

maskingCharacter public_oe property

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

maxLength public_oe property

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

maxLengthExceeded protected_oe property

protected bool maxLengthExceeded
return 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
return string

multiline public_oe property

Whether or not this field will accept multi-line input.
public bool multiline
return bool

origTextPos protected_oe property

protected Vector3 origTextPos
return Vector3

password public_oe property

When set to true, all text in this control will be masked using the specified maskingCharacter.
public bool password
return 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
return 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
return bool

stateIndices protected_oe property

protected int[,] stateIndices
return ].int[

type public_oe property

The type of keyboard to display. (iPhone OS only)
public iPhoneKeyboardType type
return iPhoneKeyboardType

typingSoundEffect public_oe property

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