UIActionBtn Class Reference

Inheritance diagram for UIActionBtn:
UIButton AutoSpriteControlBase AutoSpriteBase IUIObject SpriteBase IEZDragDrop SpriteRoot

List of all members.

Public Types

enum  CONTROL_STATE { NORMAL, OVER, ACTIVE, DISABLED }
 

Indicates the state of the button.

More...
enum  SPRITE_PLANE
enum  ANCHOR_METHOD
enum  WINDING_ORDER

Public Member Functions

override void OnInput (ref POINTER_INFO ptr)
 This is where input handling code should go in any derived class.
override string GetStateLabel (int index)
 Gets/sets the array of strings that correspond to each control state.
override void SetStateLabel (int index, string label)
 Sets the string for the specified state label.
virtual void OnInput (POINTER_INFO ptr)
 This is where input handling code should go in any derived class.
override void Copy (SpriteRoot s)
 Copies all of the specified control's settings to this control, provided they are of the same type. One exception is that layers are not copied as this would require a new allocation and could negatively impact performance at runtime.
override void Copy (SpriteRoot s, ControlCopyFlags flags)
 Copies all of the specified control's settings to this control, provided they are of the same type. One exception is that layers are not copied as this would require a new allocation and could negatively impact performance at runtime.
virtual void Copy (SpriteRoot s)
 Copies all the vital attributes of another sprite.
void Copy (IControl c)
 Copies the the specified control.
void Copy (IControl c, ControlCopyFlags flags)
 Copies the specified parts of the specified control.
override void TruncateTop (float pct)
 Truncates the top edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.
override void TruncateBottom (float pct)
 Truncates the bottom edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.
override void TruncateLeft (float pct)
 Truncates the left edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.
override void TruncateRight (float pct)
 Truncates the right edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.
override void Untruncate ()
 Removes any truncation.
override void Unclip ()
 Removes any clipping that is being applied to the sprite.
override void SetCamera (Camera c)
 Sets the camera to use when calculating a pixel-perfect sprite size.
void SetCamera ()
 A no-argument version of SetCamera() that simply re-assigns the same camera to the object, forcing it to recalculate all camera-dependent calculations.
override void Hide (bool tf)
 Hides or displays the sprite by disabling/enabling the sprite's mesh renderer component, or if managed, sets the mesh size to 0.
virtual void UpdateCollider ()
 Updates the collider of the control so that it encompasses the extents of the control's content. NOTE: To include the control's associated text in the calculation, be sure to check the includeTextInAutoCollider box.
virtual void SetInputDelegate (EZInputDelegate del)
 Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
virtual void AddInputDelegate (EZInputDelegate del)
 Adds a method to be called when input occurs (input is forwarded from OnInput()).
virtual void RemoveInputDelegate (EZInputDelegate del)
 Removes a method added with AddInputDelegate().
virtual void SetValueChangedDelegate (EZValueChangedDelegate del)
 Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
virtual void AddValueChangedDelegate (EZValueChangedDelegate del)
 Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved).
virtual void RemoveValueChangedDelegate (EZValueChangedDelegate del)
 Removes a method added with AddValueChangedDelegate().
void DefaultDragUpdatePosition (POINTER_INFO ptr)
 The default method of updating the drag position.
void SetDragPosUpdater (EZDragDropHelper.UpdateDragPositionDelegate del)
 Sets the delegate to be called in order to update the drag position of the object being dragged.
void CancelDrag ()
 Cancels any pending drag and drop operation.
void CancelFinished ()
 Signals to the object that its cancel drag transition has completed. Only call this yourself if you have overridden the default drag canceling and you are finished animating/whatever the object as a result of having its drag canceled.
void DoDefaultCancelDrag ()
 Performs the default cancel drag animation.
void AddDragDropDelegate (EZDragDropDelegate del)
 Adds a delegate to be called with drag and drop notifications.
void RemoveDragDropDelegate (EZDragDropDelegate del)
 Removes a delegate from the list of those to be called with drag and drop notifications.
void SetDragDropDelegate (EZDragDropDelegate del)
 Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates.
override void Clear ()
 Resets important sprite values to defaults for reuse.
void Setup (float w, float h)
 Sets up the essential elements of a sprite.
void Setup (float w, float h, Material material)
 Sets up the essential elements of a sprite.
virtual void CopyAll (SpriteRoot s)
 Copies all the attributes of another sprite, including its edit-time TextureAnimations.
void PlayAnim (UVAnimation anim, int frame)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
void PlayAnim (UVAnimation anim)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
void PlayAnim (int index, int frame)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
override void PlayAnim (int index)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
void PlayAnim (string name, int frame)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
override void PlayAnim (string name)
 Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.
void PlayAnimInReverse (UVAnimation anim)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
void PlayAnimInReverse (UVAnimation anim, int frame)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
override void PlayAnimInReverse (int index)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
void PlayAnimInReverse (int index, int frame)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
override void PlayAnimInReverse (string name)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
void PlayAnimInReverse (string name, int frame)
 Like PlayAnim, but plays the animation in reverse. See PlayAnim.
void DoAnim (int index)
 Plays the specified animation only if it is not already playing.
void DoAnim (string name)
 Plays the specified animation only if it is not already playing.
void DoAnim (UVAnimation anim)
 Plays the specified animation only if it is not already playing.
void SetCurFrame (int index)
 Sets the current frame of the current animation immediately.
override void StopAnim ()
 Stops the current animation from playing and resets it to the beginning for playing again. The sprite then reverts to the static image.
void UnpauseAnim ()
 Resumes an animation from where it left off previously.
UVAnimation GetCurAnim ()
 Returns a reference to the currently selected animation. NOTE: This does not mean the animation is currently playing. To determine whether the animation is playing, use IsAnimating.
UVAnimation GetAnim (string name)
 Returns a reference to the animation that matches the name specified.
override int GetStateIndex (string stateName)
 Returns the index of the state with the specified name. -1 if no state matching the specified name is found.
override void SetState (int index)
 Sets the sprite to the specified state/animation.
delegate void AnimCompleteDelegate (SpriteBase sprite)
delegate void AnimFrameDelegate (SpriteBase sprite, int frame)
override void Delete ()
 If non-managed, call Delete() before destroying this component or the GameObject to which it is attached. Memory leaks can ensue otherwise.
void SetAnimCompleteDelegate (AnimCompleteDelegate del)
 Sets the delegate to be called upon animation completion.
void SetAnimFrameDelegate (AnimFrameDelegate del)
 Sets the delegate to be called each frame of animation.
void SetSpriteResizedDelegate (SpriteResizedDelegate del)
 Sets the delegate to be called when the sprite is resized.
void AddSpriteResizedDelegate (SpriteResizedDelegate del)
 Adds the delegate to be called when the sprite is resized.
void RemoveSpriteresizedDelegate (SpriteResizedDelegate del)
 Removes the specified delegate from the list of those to be called when the sprite is resized.
void SetFramerate (float fps)
 Changes the framerate at which the current animation plays. NOTE: This only has effect if called AFTER PlayAnim() is called. Otherwise, PlayAnim() sets the framerate to whatever is specified in the animation itself.
void PauseAnim ()
 Pauses the currently-playing animation.
void RevertToStatic ()
 Reverts the sprite to its static (non-animating) default appearance.
bool IsAnimating ()
 Returns whether the sprite is currently animating.
delegate void SpriteResizedDelegate (float newWidth, float newHeight, SpriteRoot sprite)
void CalcSize ()
 Recalculates the width and height of the sprite based upon the change in its UV dimensions (autoResize) or on the current camera's disposition (pixelPerfect).
virtual void SetSize (float w, float h)
 Sets the physical dimensions of the sprite in the plane selected.
virtual void UpdateUVs ()
 Applies any changes to the UVs to the actual sprite mesh.
virtual void SetColor (Color c)
 Sets the sprite's color to the specified color.
void CalcPixelToUV ()
 Recalculates the pixel-to-UV ratio based on the current texture.
void SetTexture (Texture2D tex)
 Changes the texture to be used by the sprite's material. NOTE: This will cause the sprite not to batch with other sprites and can only be used with non-managed sprites.
void SetMaterial (Material mat)
 Changes the material to be used by the sprite. NOTE: This can only be used with non-managed sprites.
void UpdateCamera ()
 Updates any camera-dependent settings, such as the calculated pixel-perfect size. Use this with BroadcastMessage() to do bulk re-calculation of object sizes whenever your screensize/resolution changes at runtime.
bool IsHidden ()
 Returns whether the sprite is currently set to be hideAtStart (whether its mesh renderer component is enabled).
void SetBleedCompensation (float x, float y)
 Sets the bleed compensation to use (see bleedCompensation).
void SetBleedCompensation (Vector2 xy)
 Sets the bleed compensation to use (see bleedCompensation).
void SetPlane (SPRITE_PLANE p)
 Sets the plane in which the sprite is to be drawn. See: SPRITE_PLANE.
void SetWindingOrder (WINDING_ORDER order)
 Sets the winding order to use. See WINDING_ORDER.
void SetDrawLayer (int layer)
 Sets the draw layer of the sprite (only applies to managed sprites).
void SetFrameInfo (SPRITE_FRAME fInfo)
 Sets the sprite's frame info, which includes UVs, offsets, etc.
void SetUVs (Rect uv)
 Sets the sprite's UVs to the specified values.
void SetUVsFromPixelCoords (Rect pxCoords)
 Sets the sprite's UVs from pixel coordinates.
Rect GetUVs ()
 Returns the current UV coordinates of the sprite (before bleed compensation).
Vector3[] GetVertices ()
 Returns a reference to the sprite's vertices. NOTE: You can only directly modify the sprite's vertices if it is a non-managed sprite.
Vector3 GetCenterPoint ()
 Gets the center point of the sprite, taking into account the actual positions of vertices.
void SetAnchor (ANCHOR_METHOD a)
 Sets the anchor method to use. See ANCHOR_METHOD.
void SetOffset (Vector3 o)
 Sets the offset of the sprite from its GameObject. See offset.
Vector2 PixelSpaceToUVSpace (Vector2 xy)
 Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!
Vector2 PixelSpaceToUVSpace (int x, int y)
 Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!
Vector2 PixelCoordToUVCoord (Vector2 xy)
 Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!
Vector2 PixelCoordToUVCoord (int x, int y)
 Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!

Static Public Member Functions

static new UIActionBtn Create (string name, Vector3 pos)
 Creates a GameObject and attaches this component type to it.
static new UIActionBtn Create (string name, Vector3 pos, Quaternion rotation)
 Creates a GameObject and attaches this component type to it.

Public Attributes

SpriteRoot[] layers = new SpriteRoot[0]
 An array of references to sprites which will visually represent this control. Each element (layer) represents another layer to be drawn. This allows you to use multiple sprites to draw a single control, achieving a sort of layered effect. Ex: You can use a second layer to overlay a button with a highlight effect.
MonoBehaviour scriptWithMethodToInvoke
 Reference to the script component with the method you wish to invoke when the button is tapped.
string methodToInvoke = ""
 A string containing the name of the method to be invoked.
POINTER_INFO.INPUT_EVENT whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP
 Sets what event should have occurred to invoke the associated MonoBehaviour method. Defaults to TAP.
float delay
 Delay, in seconds, between the time the control is tapped and the time the method is executed.
AudioSource soundOnOver
 Sound that will be played when the button is is in an "over" state (mouse over).
AudioSource soundOnClick
 Sound that will be played when the button is activated (pressed).
bool repeat
 When repeat is true, the button will call the various delegates and invokes as long as the button is held down. NOTE: If repeat is true, it overrides any setting of "whenToInvoke"/"When To Invoke". One exception to this is that "soundToPlay" is still played based upon "whenToInvoke".
bool alwaysFinishActiveTransition = false
 When set to true, the active state transition will always run to completion even if the control changes to another state while it is running. Otherwise, the active state transition will be aborted if the control's state changes to another state while it is running.
const string DittoString = "[\"]"
 String whose meaning is to keep the previous state's label.
string text
 Text to be displayed on the control. Do not set this directly in-code. Instead, use the "Text" property or else your changes will not take effect.
SpriteText spriteText
 Reference to optional SpriteText which will display this item's text. It is STRONGLY recommended that this mesh exist on a GameObject that is a child of the list item itself.
float textOffsetZ = -0.1f
 When text is generated by the control at runtime, it will, by default, have its offsetZ setting set to this value. NOTE: Negative values will result in text being in front of the control. Positive values will place the text behind the control.
bool includeTextInAutoCollider = true
 When true, of a collider is generated for the control, the associated text is taken into account when calculating the extents of the collider.
bool detargetOnDisable = false
 When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.
object data
 Can hold a reference to any data that the developer wishes to be associated with the control.
bool isDraggable = false
 Indicates whether the object can be dragged as part of a drag & drop operation.
LayerMask dropMask = -1
 A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.
float dragOffset = float.NaN
 The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene. A value of NaN indicates the default value will be used from the UIManager.
EZAnimation.EASING_TYPE cancelDragEasing = EZAnimation.EASING_TYPE.Default
 The type of easing to use to animate the object back to its starting position when a drag operation is canceled.
float cancelDragDuration = -1f
 The duration of the easing animation when a drag and drop operation is canceled. A value of -1 indicates to use the default value specified in the UIManager.
bool doNotTrimImages = false
 When set to true, even if the "Trim Images" option is enabled in the atlas builder, the images for this object will not be trimmed.
UVAnimation[] animations
 Holds the actual UV sequences that will be used at run-time.
bool playAnimOnStart = false
 When set to true, the sprite will play the default animation (see defaultAnim) when the sprite is instantiated.
int defaultAnim = 0
 Index of the animation to play by default.
bool managed = false
 When true, the sprite will be managed by the selected sprite manager script. When false, the sprite has its own mesh and will be batched automatically with other sprites (when available - Unity iPhone).
SpriteManager manager
 Reference to the manager which will manage this sprite, provided managed is set to true.
int drawLayer
 The layer in which the sprite will be drawn if managed.
bool persistent = false
 This must be set to true at design time for the sprite to survive loading a new level.
SPRITE_PLANE plane = SPRITE_PLANE.XY
 The plane in which the sprite will be drawn.
WINDING_ORDER winding = WINDING_ORDER.CW
 The winding order of the sprite's polygons - determines the direction the sprite will "face".
float width
 Width of the sprite in world space.
float height
 Height of the sprite in world space.
Vector2 bleedCompensation
 Will contract the UV edges of the sprite by the specified amount to prevent "bleeding" from neighboring pixels, especially when mipmapping.
ANCHOR_METHOD anchor = ANCHOR_METHOD.TEXTURE_OFFSET
 Anchor method to use.

See also:
ANCHOR_METHOD

.

bool pixelPerfect = false
 Automatically sizes the sprite so that it will display pixel-perfect on-screen. NOTE: If you change the orthographic size of the camera or the distance between the sprite and a perspective camera, call SetCamera() to make the text pixel-perfect again. However, if you want automatic resizing functionality without being pixel-perfect and therefore allowing zooming in and out, use autoResize instead.
bool autoResize = false
 Automatically resizes the sprite based on its new UV dimensions compared to its previous dimensions. Setting this to true allows you to use non-uniform sized sprites for animation without causing the sprite to appear "squashed" while animating.
Vector3 offset = new Vector3()
 Offsets the sprite, in world space, from the center of its GameObject.
Color color = Color.white
 The color to be used by all four of the sprite's vertices. This can be used to color, highlight, or fade the sprite. Be sure to use a vertex-colored shader for this to have an effect.
bool hideAtStart = false
 Whether the sprite will be hideAtStart when it starts.
bool ignoreClipping = false
 When true, the sprite will not be clipped.

Properties

CONTROL_STATE controlState [get]
 Gets the current state of the button.
override bool controlIsEnabled [get, set]
 Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled.
override TextureAnim[] States [get, set]
 Accessor for the sprite's various states as defined in the editor (not used at runtime).
override string Text [get, set]
 Sets the text to be displayed in this control.
object Data [get, set]
 Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use.
virtual bool IncludeTextInAutoCollider [get, set]
 Determines whether any associated text should be taken into account when generating a collider for the control automatically.
override bool Clipped [get, set]
 Accessor for whether the sprite is to be clipped by any already-specified clipping rect.
override Rect3D ClippingRect [get, set]
 The rect against which the sprite should be clipped. The sprite will be immediately clipped by this rect when set. When setting, the rect should be in world space.
override Camera RenderCamera [get, set]
 Accessor for the camera that will be used to render this object. Use this to ensure the object is properly configured for the specific camera that will render it.
Vector2 TopLeftEdge [get]
 The top-left edge of the control, when no clipping or trimming is applied, and includes all layers and text.
Vector2 BottomRightEdge [get]
 The bottom-right edge of the control, when no clipping or trimming is applied, and includes all layers and text.
virtual bool DetargetOnDisable [get, set]
 When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.
LayerMask DropMask [get, set]
 A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.
bool IsDraggable [get, set]
 Indicates whether the object can be dragged as part of a drag & drop operation.
float DragOffset [get, set]
 The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene.
EZAnimation.EASING_TYPE CancelDragEasing [get, set]
 The type of easing to use to animate the object back to its starting position when a drag operation is canceled.
float CancelDragDuration [get, set]
 The duration of the easing animation when a drag and drop operation is canceled.
bool IsDragging [get, set]
 Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be canceled.
GameObject DropTarget [get, set]
 The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.
bool DropHandled [get, set]
 In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a canceled drop, causing the dragged object to return to its original position.
bool UseDefaultCancelDragAnim [get, set]
 Indicates whether to use the default drag canceling animation. NOTE: If you perform your own cancel animation, be sure to call CancelFinished() upon the animation's completion.
virtual CSpriteFrame DefaultFrame [get]
 Gets the default frame of the sprite object. This is the appearance the sprite is to have in the editor.
virtual bool DoNotTrimImages [get, set]
 When set to true, even if the "Trim Images" option is enabled in the atlas builder, the images for this object will not be trimmed.
bool Animating [get, set]
 Property useful for use with EZ Game Saver. When it gets set, the current animation is started. Include this, along with CurAnimIndex, as a saved property so that any playing animation is resumed.
int CurAnimIndex [get, set]
 Property useful for use with EZ Game Saver. Include this as a saved property, along with Animating, so that any playing animation is resumed.
Color Color [get, set]
 Accessor for the object's current overall color tint.
Vector2 PixelSize [get, set]
 Gets/Sets the width and height of the sprite in pixels as it appears on-screen.
Vector2 ImageSize [get]
 Gets the width and height of the image the sprite is displaying. NOTE: This is not the number of screen pixels occupied by the sprite, but rather the original number of texels which compose the sprite's image.
bool Managed [get, set]
 Sets the sprite to a managed or batched state.
ANCHOR_METHOD Anchor [get, set]
 Accessor for the object's anchor method.
Vector3 UnclippedTopLeft [get]
 The top-left corner of the sprite when no clipping or trimming is applied.
Vector3 UnclippedBottomRight [get]
 The bottom-right corner of the sprite when no clipping or trimming is applied.
Vector3 TopLeft [get]
 Returns the position of the top-left vertex of the sprite after any clipping or trimming.
Vector3 BottomRight [get]
 Returns the position of the bottom-right vertex of the sprite after any clipping or trimming.

Detailed Description

A button that sets the UIManager's ray to an active state when pressed. This can be used for things such as first-person shooters on devices that do not have hardware buttons. NOTE: to allow more than simple "clicking" of objects in the scene (i.e. allow dragging, etc.) the button must be set to repeat. </remakrs>


Member Enumeration Documentation

enum SpriteRoot::ANCHOR_METHOD [inherited]

The anchoring scheme of a sprite. The anchor point is the point on the sprite that will remain stationary when the sprite's size changes. For a health bar that "grows" to the right while its left edge remains stationary, you would use UPPER_LEFT, MIDDLE_LEFT, or BOTTOM_LEFT.

For a health bar that "grows" upward while the bottom edge remains stationary, you would use BOTTOM_LEFT, BOTTOM_CENTER, or BOTTOM_RIGHT.

enum UIButton::CONTROL_STATE [inherited]

Indicates the state of the button.

Enumerator:
NORMAL 

The button is "normal", awaiting input.

OVER 

The button has an input device hovering over it.

ACTIVE 

The button is being pressed.

DISABLED 

The button is disabled.

enum SpriteRoot::SPRITE_PLANE [inherited]

The plane in which a sprite should be drawn.

enum SpriteRoot::WINDING_ORDER [inherited]

Defines which way the polygons of a sprite should be wound. The two options are clock-wise (CW) and counter clock-wise (CCW). These determine the direction the sprite will "face".


Member Function Documentation

void AutoSpriteControlBase.AddDragDropDelegate ( EZDragDropDelegate  del  )  [inherited]

Adds a delegate to be called with drag and drop notifications.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

virtual void AutoSpriteControlBase.AddInputDelegate ( EZInputDelegate  del  )  [virtual, inherited]

Adds a method to be called when input occurs (input is forwarded from OnInput()).

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

Reimplemented in UISlider.

void SpriteBase.AddSpriteResizedDelegate ( SpriteResizedDelegate  del  )  [inherited]

Adds the delegate to be called when the sprite is resized.

Parameters:
del A delegate to be called when the sprite is resized.
virtual void AutoSpriteControlBase.AddValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual, inherited]

Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved).

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.

delegate void SpriteBase.AnimCompleteDelegate ( SpriteBase  sprite  )  [inherited]

Defines a delegate that can be called upon animation completion. Use this if you want something to happen as soon as an animation reaches the end. Receives a reference to the sprite.

Parameters:
sprite A reference to the sprite whose animation has finished.
delegate void SpriteBase.AnimFrameDelegate ( SpriteBase  sprite,
int  frame 
) [inherited]

Defines a delegate that can be called once for each frame of animation. Use this if you want something to happen on an animation frame. Receives a reference to the sprite and the zero-based index of the current frame as an argument.

Parameters:
sprite A reference to the sprite which is calling the delegate.
frame The current animation frame number. (0-based)
void SpriteRoot.CalcPixelToUV (  )  [inherited]

Recalculates the pixel-to-UV ratio based on the current texture.

void SpriteRoot.CalcSize (  )  [inherited]

Recalculates the width and height of the sprite based upon the change in its UV dimensions (autoResize) or on the current camera's disposition (pixelPerfect).

void AutoSpriteControlBase.CancelDrag (  )  [inherited]

Cancels any pending drag and drop operation.

Implements IEZDragDrop.

void AutoSpriteControlBase.CancelFinished (  )  [inherited]

Signals to the object that its cancel drag transition has completed. Only call this yourself if you have overridden the default drag canceling and you are finished animating/whatever the object as a result of having its drag canceled.

override void AutoSpriteBase.Clear (  )  [virtual, inherited]

Resets important sprite values to defaults for reuse.

Reimplemented from SpriteBase.

void IControl.Copy ( IControl  c,
ControlCopyFlags  flags 
) [inherited]

Copies the specified parts of the specified control.

Parameters:
c The control to be copied.
flags Flags specifying which attributes of the control are to be copied.
void IControl.Copy ( IControl  c  )  [inherited]

Copies the the specified control.

Parameters:
c The control to be copied.
virtual void SpriteRoot.Copy ( SpriteRoot  s  )  [virtual, inherited]

Copies all the vital attributes of another sprite.

Parameters:
s Source sprite to be copied.
override void UIButton.Copy ( SpriteRoot  s,
ControlCopyFlags  flags 
) [virtual, inherited]

Copies all of the specified control's settings to this control, provided they are of the same type. One exception is that layers are not copied as this would require a new allocation and could negatively impact performance at runtime.

Parameters:
s Reference to the control whose settings are to be copied to this control.

Reimplemented from AutoSpriteControlBase.

Reimplemented in UIBtnChangePanel, UIBtnLoadScene, UIBtnWWW, UIListItem, and UIScrollKnob.

override void UIButton.Copy ( SpriteRoot  s  )  [inherited]

Copies all of the specified control's settings to this control, provided they are of the same type. One exception is that layers are not copied as this would require a new allocation and could negatively impact performance at runtime.

Parameters:
s Reference to the control whose settings are to be copied to this control.

Reimplemented from AutoSpriteControlBase.

Reimplemented in UIBtnChangePanel, UIBtnLoadScene, UIBtnWWW, and UIListItem.

virtual void AutoSpriteBase.CopyAll ( SpriteRoot  s  )  [virtual, inherited]

Copies all the attributes of another sprite, including its edit-time TextureAnimations.

Parameters:
s A reference to the sprite to be copied.
static new UIActionBtn UIActionBtn.Create ( string  name,
Vector3  pos,
Quaternion  rotation 
) [static]

Creates a GameObject and attaches this component type to it.

Parameters:
name Name to give to the new GameObject.
pos Position, in world space, where the new object should be created.
rotation Rotation of the object.
Returns:
Returns a reference to the component.

Reimplemented from UIButton.

static new UIActionBtn UIActionBtn.Create ( string  name,
Vector3  pos 
) [static]

Creates a GameObject and attaches this component type to it.

Parameters:
name Name to give to the new GameObject.
pos Position, in world space, where the new object should be created.
Returns:
Returns a reference to the component.

Reimplemented from UIButton.

void AutoSpriteControlBase.DefaultDragUpdatePosition ( POINTER_INFO  ptr  )  [inherited]

The default method of updating the drag position.

Parameters:
ptr The pointer info struct for the pointer dragging the object.
override void SpriteBase.Delete (  )  [virtual, inherited]

If non-managed, call Delete() before destroying this component or the GameObject to which it is attached. Memory leaks can ensue otherwise.

Reimplemented from SpriteRoot.

void AutoSpriteBase.DoAnim ( UVAnimation  anim  )  [inherited]

Plays the specified animation only if it is not already playing.

Parameters:
anim Reference to the animation to play.
void AutoSpriteBase.DoAnim ( string  name  )  [inherited]

Plays the specified animation only if it is not already playing.

Parameters:
name Name of the animation to play.
void AutoSpriteBase.DoAnim ( int  index  )  [inherited]

Plays the specified animation only if it is not already playing.

Parameters:
index Index of the animation to play.
void AutoSpriteControlBase.DoDefaultCancelDrag (  )  [inherited]

Performs the default cancel drag animation.

UVAnimation AutoSpriteBase.GetAnim ( string  name  )  [inherited]

Returns a reference to the animation that matches the name specified.

Parameters:
name Name of the animation sought.
Returns:
Reference to the animation, if found, null otherwise.
Vector3 SpriteRoot.GetCenterPoint (  )  [inherited]

Gets the center point of the sprite, taking into account the actual positions of vertices.

Returns:
The center point of the sprite.
UVAnimation AutoSpriteBase.GetCurAnim (  )  [inherited]

Returns a reference to the currently selected animation. NOTE: This does not mean the animation is currently playing. To determine whether the animation is playing, use IsAnimating.

Returns:
Reference to the currently selected animation.
override int AutoSpriteBase.GetStateIndex ( string  stateName  )  [virtual, inherited]

Returns the index of the state with the specified name. -1 if no state matching the specified name is found.

Parameters:
stateName The name of the state sought.
Returns:
The zero-based index of the state, or -1 if no state is found by that name.

Implements SpriteRoot.

override string UIButton.GetStateLabel ( int  index  )  [virtual, inherited]

Gets/sets the array of strings that correspond to each control state.

Reimplemented from AutoSpriteControlBase.

Rect SpriteRoot.GetUVs (  )  [inherited]

Returns the current UV coordinates of the sprite (before bleed compensation).

Returns:
Rect containing the sprite's UV coordinates.
Vector3 [] SpriteRoot.GetVertices (  )  [inherited]

Returns a reference to the sprite's vertices. NOTE: You can only directly modify the sprite's vertices if it is a non-managed sprite.

Returns:
A reference to the sprite's vertices.
override void AutoSpriteControlBase.Hide ( bool  tf  )  [virtual, inherited]

Hides or displays the sprite by disabling/enabling the sprite's mesh renderer component, or if managed, sets the mesh size to 0.

Parameters:
tf When true, the sprite is hideAtStart, when false, the sprite will be displayed.

Reimplemented from SpriteBase.

Reimplemented in UIListItem, UIProgressBar, UISlider, and UITextField.

bool SpriteBase.IsAnimating (  )  [inherited]

Returns whether the sprite is currently animating.

Returns:
True if the sprite is currently animating, false otherwise.
bool SpriteRoot.IsHidden (  )  [inherited]

Returns whether the sprite is currently set to be hideAtStart (whether its mesh renderer component is enabled).

Returns:
True when hideAtStart, false when set to be displayed.
virtual void AutoSpriteControlBase.OnInput ( POINTER_INFO  ptr  )  [virtual, inherited]

This is where input handling code should go in any derived class.

Parameters:
ptr POINTER_INFO struct that contains information on the pointer that caused the event, as well as the event that occurred.

Implements IUIObject.

override void UIActionBtn.OnInput ( ref POINTER_INFO  ptr  )  [virtual]

This is where input handling code should go in any derived class.

Parameters:
ptr POINTER_INFO struct that contains information on the pointer that caused the event, as well as the event that occurred.

Reimplemented from UIButton.

void SpriteBase.PauseAnim (  )  [inherited]

Pauses the currently-playing animation.

Vector2 SpriteRoot.PixelCoordToUVCoord ( int  x,
int  y 
) [inherited]

Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!

Parameters:
x The x-coordinate to convert.
y The y-coordinate to convert.
Returns:
The coordinates converted to UV coordinates.
Vector2 SpriteRoot.PixelCoordToUVCoord ( Vector2  xy  )  [inherited]

Converts pixel coordinates to UV coordinates according to the currently assigned material. NOTE: This is for converting coordinates and will reverse the Y component accordingly. For converting widths and heights, use PixelSpaceToUVSpace()!

Parameters:
xy The coordinates to convert.
Returns:
The coordinates converted to UV coordinates.
Vector2 SpriteRoot.PixelSpaceToUVSpace ( int  x,
int  y 
) [inherited]

Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!

Parameters:
x The X-value to convert.
y The Y-value to convert.
Returns:
The values converted to UV space.
Vector2 SpriteRoot.PixelSpaceToUVSpace ( Vector2  xy  )  [inherited]

Converts pixel-space values to UV-space scalar values according to the currently assigned material. NOTE: This is for converting widths and heights-not coordinates (which have reversed Y-coordinates). For coordinates, use PixelCoordToUVCoord()!

Parameters:
xy The values to convert.
Returns:
The values converted to UV space.
override void AutoSpriteBase.PlayAnim ( string  name  )  [virtual, inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
name The name of the animation to play.

Reimplemented from SpriteBase.

void AutoSpriteBase.PlayAnim ( string  name,
int  frame 
) [inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
name The name of the animation to play.
frame The zero-based index of the frame at which to start playing.
override void AutoSpriteBase.PlayAnim ( int  index  )  [virtual, inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
index Index of the animation to play.

Reimplemented from SpriteBase.

void AutoSpriteBase.PlayAnim ( int  index,
int  frame 
) [inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
index Index of the animation to play.
frame The zero-based index of the frame at which to start playing.
void AutoSpriteBase.PlayAnim ( UVAnimation  anim  )  [inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
anim A reference to the animation to play.
void AutoSpriteBase.PlayAnim ( UVAnimation  anim,
int  frame 
) [inherited]

Starts playing the specified animation Note: this doesn't resume from a pause, it completely restarts the animation. To unpause, use UnpauseAnim.

Parameters:
anim A reference to the animation to play.
frame The zero-based index of the frame at which to start playing.
void AutoSpriteBase.PlayAnimInReverse ( string  name,
int  frame 
) [inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
name Name of the animation to play in reverse.
frame The zero-based index of the frame at which to start playing.
override void AutoSpriteBase.PlayAnimInReverse ( string  name  )  [virtual, inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
name Name of the animation to play in reverse.

Reimplemented from SpriteBase.

void AutoSpriteBase.PlayAnimInReverse ( int  index,
int  frame 
) [inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
index Index of the animation to play in reverse.
frame The zero-based index of the frame at which to start playing.
override void AutoSpriteBase.PlayAnimInReverse ( int  index  )  [virtual, inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
index Index of the animation to play in reverse.

Reimplemented from SpriteBase.

void AutoSpriteBase.PlayAnimInReverse ( UVAnimation  anim,
int  frame 
) [inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
anim Reference to the animation to play in reverse.
frame The zero-based index of the frame at which to start playing.
void AutoSpriteBase.PlayAnimInReverse ( UVAnimation  anim  )  [inherited]

Like PlayAnim, but plays the animation in reverse. See PlayAnim.

Parameters:
anim Reference to the animation to play in reverse.
void AutoSpriteControlBase.RemoveDragDropDelegate ( EZDragDropDelegate  del  )  [inherited]

Removes a delegate from the list of those to be called with drag and drop notifications.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

virtual void AutoSpriteControlBase.RemoveInputDelegate ( EZInputDelegate  del  )  [virtual, inherited]

Removes a method added with AddInputDelegate().

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

Reimplemented in UISlider.

void SpriteBase.RemoveSpriteresizedDelegate ( SpriteResizedDelegate  del  )  [inherited]

Removes the specified delegate from the list of those to be called when the sprite is resized.

Parameters:
del The delegate to be removed.
virtual void AutoSpriteControlBase.RemoveValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual, inherited]

Removes a method added with AddValueChangedDelegate().

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.

void SpriteBase.RevertToStatic (  )  [inherited]

Reverts the sprite to its static (non-animating) default appearance.

void SpriteRoot.SetAnchor ( ANCHOR_METHOD  a  )  [inherited]

Sets the anchor method to use. See ANCHOR_METHOD.

Parameters:
a The anchor method to use.
void SpriteBase.SetAnimCompleteDelegate ( AnimCompleteDelegate  del  )  [inherited]

Sets the delegate to be called upon animation completion.

Parameters:
del The delegate to be called when an animation finishes playing.
void SpriteBase.SetAnimFrameDelegate ( AnimFrameDelegate  del  )  [inherited]

Sets the delegate to be called each frame of animation.

Parameters:
del The delegate to be called each frame of animation.
void SpriteRoot.SetBleedCompensation ( Vector2  xy  )  [inherited]

Sets the bleed compensation to use (see bleedCompensation).

void SpriteRoot.SetBleedCompensation ( float  x,
float  y 
) [inherited]

Sets the bleed compensation to use (see bleedCompensation).

void SpriteRoot.SetCamera (  )  [inherited]

A no-argument version of SetCamera() that simply re-assigns the same camera to the object, forcing it to recalculate all camera-dependent calculations.

override void AutoSpriteControlBase.SetCamera ( Camera  c  )  [virtual, inherited]

Sets the camera to use when calculating a pixel-perfect sprite size.

Parameters:
c 

Reimplemented from SpriteRoot.

virtual void SpriteRoot.SetColor ( Color  c  )  [virtual, inherited]

Sets the sprite's color to the specified color.

Parameters:
c Color to shade the sprite.

Reimplemented in UIProgressBar, and UISlider.

void AutoSpriteBase.SetCurFrame ( int  index  )  [inherited]

Sets the current frame of the current animation immediately.

Parameters:
index Zero-based index of the desired frame.
void AutoSpriteControlBase.SetDragDropDelegate ( EZDragDropDelegate  del  )  [inherited]

Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates.

Parameters:
del The delegate to add.

Implements IEZDragDrop.

void AutoSpriteControlBase.SetDragPosUpdater ( EZDragDropHelper.UpdateDragPositionDelegate  del  )  [inherited]

Sets the delegate to be called in order to update the drag position of the object being dragged.

Parameters:
del The delegate that will update the object's position.
void SpriteRoot.SetDrawLayer ( int  layer  )  [inherited]

Sets the draw layer of the sprite (only applies to managed sprites).

Parameters:
layer The draw layer of the sprite. Lower values cause an earlier draw order, higher values, a later draw order.
void SpriteRoot.SetFrameInfo ( SPRITE_FRAME  fInfo  )  [inherited]

Sets the sprite's frame info, which includes UVs, offsets, etc.

Parameters:
fInfo A SPRITE_FRAME structure containing the frame info.
void SpriteBase.SetFramerate ( float  fps  )  [inherited]

Changes the framerate at which the current animation plays. NOTE: This only has effect if called AFTER PlayAnim() is called. Otherwise, PlayAnim() sets the framerate to whatever is specified in the animation itself.

Parameters:
fps The new framerate, in frames per second.
virtual void AutoSpriteControlBase.SetInputDelegate ( EZInputDelegate  del  )  [virtual, inherited]

Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.

Parameters:
del A method that conforms to the EZInputDelegate pattern.

Implements IUIObject.

Reimplemented in UISlider.

void SpriteRoot.SetMaterial ( Material  mat  )  [inherited]

Changes the material to be used by the sprite. NOTE: This can only be used with non-managed sprites.

Parameters:
mat The new material.
void SpriteRoot.SetOffset ( Vector3  o  )  [inherited]

Sets the offset of the sprite from its GameObject. See offset.

Parameters:
o The offset to use.
void SpriteRoot.SetPlane ( SPRITE_PLANE  p  )  [inherited]

Sets the plane in which the sprite is to be drawn. See: SPRITE_PLANE.

Parameters:
p The plane in which the sprite should be drawn.
virtual void SpriteRoot.SetSize ( float  w,
float  h 
) [virtual, inherited]

Sets the physical dimensions of the sprite in the plane selected.

Parameters:
width Width of the sprite in world space.
height Height of the sprite in world space.

Reimplemented in UIProgressBar, and UISlider.

void SpriteBase.SetSpriteResizedDelegate ( SpriteResizedDelegate  del  )  [inherited]

Sets the delegate to be called when the sprite is resized.

Parameters:
del The delegate to be called when the sprite is resized.
override void AutoSpriteBase.SetState ( int  index  )  [virtual, inherited]

Sets the sprite to the specified state/animation.

Parameters:
index The zero-based index of the desired state/animation.

Implements SpriteRoot.

override void UIButton.SetStateLabel ( int  index,
string  label 
) [virtual, inherited]

Sets the string for the specified state label.

Parameters:
index index of the state to set.
label The string to set as the state's label.

Reimplemented from AutoSpriteControlBase.

void SpriteRoot.SetTexture ( Texture2D  tex  )  [inherited]

Changes the texture to be used by the sprite's material. NOTE: This will cause the sprite not to batch with other sprites and can only be used with non-managed sprites.

Parameters:
tex The new texture.
void AutoSpriteBase.Setup ( float  w,
float  h,
Material  material 
) [inherited]

Sets up the essential elements of a sprite.

Parameters:
w The width, in local space, of the sprite.
h The height, in local space, of the sprite.
material The material to use for the sprite.
void AutoSpriteBase.Setup ( float  w,
float  h 
) [inherited]

Sets up the essential elements of a sprite.

Parameters:
w The width, in local space, of the sprite.
h The height, in local space, of the sprite.
void SpriteRoot.SetUVs ( Rect  uv  )  [inherited]

Sets the sprite's UVs to the specified values.

Parameters:
nextFrame A Rect containing the new UV coordinates.
void SpriteRoot.SetUVsFromPixelCoords ( Rect  pxCoords  )  [inherited]

Sets the sprite's UVs from pixel coordinates.

Parameters:
pxCoords A rect containing the pixel coordinates. When populating the Rect, use the following syntax: Rect.MinMaxRect(leftCoord, bottomCoord, rightCoord, topCoord) Where the coordinates are in pixel space. Like in any image editor, the coordinate space runs from 0 on the left to width-1 on the right, and 0 at the top, to height-1 at the bottom.
virtual void AutoSpriteControlBase.SetValueChangedDelegate ( EZValueChangedDelegate  del  )  [virtual, inherited]

Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.

Parameters:
del A method that conforms to the EZValueChangedDelegate pattern.

Implements IUIObject.

void SpriteRoot.SetWindingOrder ( WINDING_ORDER  order  )  [inherited]

Sets the winding order to use. See WINDING_ORDER.

Parameters:
order The winding order to use.
delegate void SpriteRoot.SpriteResizedDelegate ( float  newWidth,
float  newHeight,
SpriteRoot  sprite 
) [inherited]

Defines a delegate that can be called upon resizing of the sprite. Use this if you want to adjust colliders, etc, when the sprites dimensions are resized.

override void AutoSpriteBase.StopAnim (  )  [virtual, inherited]

Stops the current animation from playing and resets it to the beginning for playing again. The sprite then reverts to the static image.

Reimplemented from SpriteBase.

override void AutoSpriteControlBase.TruncateBottom ( float  pct  )  [virtual, inherited]

Truncates the bottom edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.

Parameters:
pct The percentage of the sprite to truncate (0-1)

Reimplemented from SpriteRoot.

Reimplemented in UIListItem.

override void AutoSpriteControlBase.TruncateLeft ( float  pct  )  [virtual, inherited]

Truncates the left edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.

Parameters:
pct The percentage of the sprite to truncate (0-1)

Reimplemented from SpriteRoot.

Reimplemented in UIListItem.

override void AutoSpriteControlBase.TruncateRight ( float  pct  )  [virtual, inherited]

Truncates the right edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.

Parameters:
pct The percentage of the sprite to truncate (0-1)

Reimplemented from SpriteRoot.

Reimplemented in UIListItem.

override void AutoSpriteControlBase.TruncateTop ( float  pct  )  [virtual, inherited]

Truncates the top edge of the sprite to the specified percentage. 1 == no truncation 0 == complete truncation.

Parameters:
pct The percentage of the sprite to truncate (0-1)

Reimplemented from SpriteRoot.

Reimplemented in UIListItem.

override void AutoSpriteControlBase.Unclip (  )  [virtual, inherited]

Removes any clipping that is being applied to the sprite.

Reimplemented from SpriteRoot.

Reimplemented in UIProgressBar, UISlider, and UITextField.

void AutoSpriteBase.UnpauseAnim (  )  [inherited]

Resumes an animation from where it left off previously.

override void AutoSpriteControlBase.Untruncate (  )  [virtual, inherited]

Removes any truncation.

Reimplemented from SpriteRoot.

Reimplemented in UIListItem.

void SpriteRoot.UpdateCamera (  )  [inherited]

Updates any camera-dependent settings, such as the calculated pixel-perfect size. Use this with BroadcastMessage() to do bulk re-calculation of object sizes whenever your screensize/resolution changes at runtime.

virtual void AutoSpriteControlBase.UpdateCollider (  )  [virtual, inherited]

Updates the collider of the control so that it encompasses the extents of the control's content. NOTE: To include the control's associated text in the calculation, be sure to check the includeTextInAutoCollider box.

Reimplemented in UIScrollKnob.

virtual void SpriteRoot.UpdateUVs (  )  [virtual, inherited]

Applies any changes to the UVs to the actual sprite mesh.


Member Data Documentation

bool UIButton.alwaysFinishActiveTransition = false [inherited]

When set to true, the active state transition will always run to completion even if the control changes to another state while it is running. Otherwise, the active state transition will be aborted if the control's state changes to another state while it is running.

ANCHOR_METHOD SpriteRoot.anchor = ANCHOR_METHOD.TEXTURE_OFFSET [inherited]

Anchor method to use.

See also:
ANCHOR_METHOD

.

Holds the actual UV sequences that will be used at run-time.

bool SpriteRoot.autoResize = false [inherited]

Automatically resizes the sprite based on its new UV dimensions compared to its previous dimensions. Setting this to true allows you to use non-uniform sized sprites for animation without causing the sprite to appear "squashed" while animating.

Vector2 SpriteRoot.bleedCompensation [inherited]

Will contract the UV edges of the sprite by the specified amount to prevent "bleeding" from neighboring pixels, especially when mipmapping.

The duration of the easing animation when a drag and drop operation is canceled. A value of -1 indicates to use the default value specified in the UIManager.

EZAnimation.EASING_TYPE AutoSpriteControlBase.cancelDragEasing = EZAnimation.EASING_TYPE.Default [inherited]

The type of easing to use to animate the object back to its starting position when a drag operation is canceled.

Color SpriteRoot.color = Color.white [inherited]

The color to be used by all four of the sprite's vertices. This can be used to color, highlight, or fade the sprite. Be sure to use a vertex-colored shader for this to have an effect.

object AutoSpriteControlBase.data [inherited]

Can hold a reference to any data that the developer wishes to be associated with the control.

int SpriteBase.defaultAnim = 0 [inherited]

Index of the animation to play by default.

float UIButton.delay [inherited]

Delay, in seconds, between the time the control is tapped and the time the method is executed.

bool AutoSpriteControlBase.detargetOnDisable = false [inherited]

When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.

const string AutoSpriteControlBase.DittoString = "[\"]" [inherited]

String whose meaning is to keep the previous state's label.

bool AutoSpriteBase.doNotTrimImages = false [inherited]

When set to true, even if the "Trim Images" option is enabled in the atlas builder, the images for this object will not be trimmed.

float AutoSpriteControlBase.dragOffset = float.NaN [inherited]

The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene. A value of NaN indicates the default value will be used from the UIManager.

int SpriteRoot.drawLayer [inherited]

The layer in which the sprite will be drawn if managed.

LayerMask AutoSpriteControlBase.dropMask = -1 [inherited]

A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.

float SpriteRoot.height [inherited]

Height of the sprite in world space.

bool SpriteRoot.hideAtStart = false [inherited]

Whether the sprite will be hideAtStart when it starts.

bool SpriteRoot.ignoreClipping = false [inherited]

When true, the sprite will not be clipped.

When true, of a collider is generated for the control, the associated text is taken into account when calculating the extents of the collider.

bool AutoSpriteControlBase.isDraggable = false [inherited]

Indicates whether the object can be dragged as part of a drag & drop operation.

SpriteRoot [] UIButton.layers = new SpriteRoot[0] [inherited]

An array of references to sprites which will visually represent this control. Each element (layer) represents another layer to be drawn. This allows you to use multiple sprites to draw a single control, achieving a sort of layered effect. Ex: You can use a second layer to overlay a button with a highlight effect.

bool SpriteRoot.managed = false [inherited]

When true, the sprite will be managed by the selected sprite manager script. When false, the sprite has its own mesh and will be batched automatically with other sprites (when available - Unity iPhone).

Reference to the manager which will manage this sprite, provided managed is set to true.

string UIButton.methodToInvoke = "" [inherited]

A string containing the name of the method to be invoked.

Vector3 SpriteRoot.offset = new Vector3() [inherited]

Offsets the sprite, in world space, from the center of its GameObject.

bool SpriteRoot.persistent = false [inherited]

This must be set to true at design time for the sprite to survive loading a new level.

bool SpriteRoot.pixelPerfect = false [inherited]

Automatically sizes the sprite so that it will display pixel-perfect on-screen. NOTE: If you change the orthographic size of the camera or the distance between the sprite and a perspective camera, call SetCamera() to make the text pixel-perfect again. However, if you want automatic resizing functionality without being pixel-perfect and therefore allowing zooming in and out, use autoResize instead.

SPRITE_PLANE SpriteRoot.plane = SPRITE_PLANE.XY [inherited]

The plane in which the sprite will be drawn.

bool SpriteBase.playAnimOnStart = false [inherited]

When set to true, the sprite will play the default animation (see defaultAnim) when the sprite is instantiated.

bool UIButton.repeat [inherited]

When repeat is true, the button will call the various delegates and invokes as long as the button is held down. NOTE: If repeat is true, it overrides any setting of "whenToInvoke"/"When To Invoke". One exception to this is that "soundToPlay" is still played based upon "whenToInvoke".

MonoBehaviour UIButton.scriptWithMethodToInvoke [inherited]

Reference to the script component with the method you wish to invoke when the button is tapped.

AudioSource UIButton.soundOnClick [inherited]

Sound that will be played when the button is activated (pressed).

AudioSource UIButton.soundOnOver [inherited]

Sound that will be played when the button is is in an "over" state (mouse over).

Reference to optional SpriteText which will display this item's text. It is STRONGLY recommended that this mesh exist on a GameObject that is a child of the list item itself.

string AutoSpriteControlBase.text [inherited]

Text to be displayed on the control. Do not set this directly in-code. Instead, use the "Text" property or else your changes will not take effect.

float AutoSpriteControlBase.textOffsetZ = -0.1f [inherited]

When text is generated by the control at runtime, it will, by default, have its offsetZ setting set to this value. NOTE: Negative values will result in text being in front of the control. Positive values will place the text behind the control.

POINTER_INFO.INPUT_EVENT UIButton.whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP [inherited]

Sets what event should have occurred to invoke the associated MonoBehaviour method. Defaults to TAP.

float SpriteRoot.width [inherited]

Width of the sprite in world space.

WINDING_ORDER SpriteRoot.winding = WINDING_ORDER.CW [inherited]

The winding order of the sprite's polygons - determines the direction the sprite will "face".


Property Documentation

ANCHOR_METHOD SpriteRoot.Anchor [get, set, inherited]

Accessor for the object's anchor method.

bool SpriteBase.Animating [get, set, inherited]

Property useful for use with EZ Game Saver. When it gets set, the current animation is started. Include this, along with CurAnimIndex, as a saved property so that any playing animation is resumed.

Vector3 SpriteRoot.BottomRight [get, inherited]

Returns the position of the bottom-right vertex of the sprite after any clipping or trimming.

Vector2 AutoSpriteControlBase.BottomRightEdge [get, inherited]

The bottom-right edge of the control, when no clipping or trimming is applied, and includes all layers and text.

float AutoSpriteControlBase.CancelDragDuration [get, set, inherited]

The duration of the easing animation when a drag and drop operation is canceled.

Implements IEZDragDrop.

EZAnimation.EASING_TYPE AutoSpriteControlBase.CancelDragEasing [get, set, inherited]

The type of easing to use to animate the object back to its starting position when a drag operation is canceled.

Implements IEZDragDrop.

override bool AutoSpriteControlBase.Clipped [get, set, inherited]

Accessor for whether the sprite is to be clipped by any already-specified clipping rect.

Reimplemented from SpriteRoot.

Reimplemented in UIProgressBar, UISlider, and UITextField.

override Rect3D AutoSpriteControlBase.ClippingRect [get, set, inherited]

The rect against which the sprite should be clipped. The sprite will be immediately clipped by this rect when set. When setting, the rect should be in world space.

Reimplemented from SpriteRoot.

Reimplemented in UIProgressBar, UISlider, and UITextField.

Color SpriteRoot.Color [get, set, inherited]

Accessor for the object's current overall color tint.

override bool UIButton.controlIsEnabled [get, set, inherited]

Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled.

Reimplemented from AutoSpriteControlBase.

CONTROL_STATE UIButton.controlState [get, inherited]

Gets the current state of the button.

int SpriteBase.CurAnimIndex [get, set, inherited]

Property useful for use with EZ Game Saver. Include this as a saved property, along with Animating, so that any playing animation is resumed.

object AutoSpriteControlBase.Data [get, set, inherited]

Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use.

Implements IEZDragDrop.

virtual CSpriteFrame AutoSpriteBase.DefaultFrame [get, inherited]

Gets the default frame of the sprite object. This is the appearance the sprite is to have in the editor.

Reimplemented in UIRadioBtn, UIStateToggleBtn, and PackedSprite.

virtual bool AutoSpriteControlBase.DetargetOnDisable [get, set, inherited]

When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.

Implements IUIObject.

virtual bool AutoSpriteBase.DoNotTrimImages [get, set, inherited]

When set to true, even if the "Trim Images" option is enabled in the atlas builder, the images for this object will not be trimmed.

float AutoSpriteControlBase.DragOffset [get, set, inherited]

The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene.

Implements IEZDragDrop.

bool AutoSpriteControlBase.DropHandled [get, set, inherited]

In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a canceled drop, causing the dragged object to return to its original position.

Implements IEZDragDrop.

LayerMask AutoSpriteControlBase.DropMask [get, set, inherited]

A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.

Implements IEZDragDrop.

GameObject AutoSpriteControlBase.DropTarget [get, set, inherited]

The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.

Implements IEZDragDrop.

Vector2 SpriteRoot.ImageSize [get, inherited]

Gets the width and height of the image the sprite is displaying. NOTE: This is not the number of screen pixels occupied by the sprite, but rather the original number of texels which compose the sprite's image.

virtual bool AutoSpriteControlBase.IncludeTextInAutoCollider [get, set, inherited]

Determines whether any associated text should be taken into account when generating a collider for the control automatically.

bool AutoSpriteControlBase.IsDraggable [get, set, inherited]

Indicates whether the object can be dragged as part of a drag & drop operation.

Implements IEZDragDrop.

bool AutoSpriteControlBase.IsDragging [get, set, inherited]

Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be canceled.

Implements IEZDragDrop.

bool SpriteRoot.Managed [get, set, inherited]

Sets the sprite to a managed or batched state.

Vector2 SpriteRoot.PixelSize [get, set, inherited]

Gets/Sets the width and height of the sprite in pixels as it appears on-screen.

override Camera AutoSpriteControlBase.RenderCamera [get, set, inherited]

Accessor for the camera that will be used to render this object. Use this to ensure the object is properly configured for the specific camera that will render it.

Reimplemented from SpriteRoot.

override TextureAnim [] UIButton.States [get, set, inherited]

Accessor for the sprite's various states as defined in the editor (not used at runtime).

Reimplemented from AutoSpriteBase.

override string UIButton.Text [get, set, inherited]

Sets the text to be displayed in this control.

Reimplemented from AutoSpriteControlBase.

Reimplemented in UIListItem.

Vector3 SpriteRoot.TopLeft [get, inherited]

Returns the position of the top-left vertex of the sprite after any clipping or trimming.

Vector2 AutoSpriteControlBase.TopLeftEdge [get, inherited]

The top-left edge of the control, when no clipping or trimming is applied, and includes all layers and text.

Vector3 SpriteRoot.UnclippedBottomRight [get, inherited]

The bottom-right corner of the sprite when no clipping or trimming is applied.

Vector3 SpriteRoot.UnclippedTopLeft [get, inherited]

The top-left corner of the sprite when no clipping or trimming is applied.

bool AutoSpriteControlBase.UseDefaultCancelDragAnim [get, set, inherited]

Indicates whether to use the default drag canceling animation. NOTE: If you perform your own cancel animation, be sure to call CancelFinished() upon the animation's completion.


The documentation for this class was generated from the following file:

Generated on Thu Sep 8 16:31:18 2011 for EZ GUI by  doxygen 1.6.1