Public Types | |
enum | SPRITE_PLANE |
enum | ANCHOR_METHOD |
enum | WINDING_ORDER |
Public Member Functions | |
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. | |
override void | OnInput (ref 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. | |
void | SetGroup (GameObject parent) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group. | |
void | SetGroup (Transform parent) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group. | |
void | SetGroup (int groupID) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group. | |
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 | 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. | |
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(). | |
virtual void | OnInput (POINTER_INFO ptr) |
This is where input handling code should go in any derived class. | |
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 UIRadioBtn | Create (string name, Vector3 pos) |
Creates a GameObject and attaches this component type to it. | |
static UIRadioBtn | Create (string name, Vector3 pos, Quaternion rotation) |
Creates a GameObject and attaches this component type to it. | |
Public Attributes | |
bool | useParentForGrouping = true |
When true, the radio button will group itself with other radio buttons based on whether they share the same parent GameObject. | |
int | radioGroup |
The numbered group to which this radio button belongs. Buttons that share a group will be mutually exclusive to one another. This value is only available if RADIOBTN_USE_PARENT is not defined. Otherwise, by default, radio buttons group themselves according to a common parent GameObject. | |
bool | defaultValue |
The default value of the button. | |
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 changes states. | |
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 | soundToPlay |
Sound that will be played when the button is tapped. | |
bool | disableHoverEffect = false |
When false, any "layer" that is set will be assumed to contain states for "Over" and "Active" so as to provide visuals for the "Hover" effect, as well as the "Active" (pressed) effect. When true, however, the layers are assumed to only be used to mirror the control's current state/value, and will not provide "Over" and "Active" state appearances. | |
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.
| |
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. | |
Protected Types | |
enum | CONTROL_STATE { , Over, Active } |
Properties | |
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. | |
virtual bool | Value [get, set] |
Provides access to the boolean value of the button. | |
override TextureAnim[] | States [get, set] |
Accessor for the sprite's various states as defined in the editor (not used at runtime). | |
override CSpriteFrame | DefaultFrame [get] |
Gets the default frame of the sprite object. This is the appearance the sprite is to have in the editor. | |
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 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. |
Button class that allows you to allow selection among of set of mutually exclusive options.
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 UIRadioBtn::CONTROL_STATE [protected] |
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".
void AutoSpriteControlBase.AddDragDropDelegate | ( | EZDragDropDelegate | del | ) | [inherited] |
Adds a delegate to be called with drag and drop notifications.
del | The delegate to add. |
Implements IEZDragDrop.
virtual void AutoSpriteControlBase.AddInputDelegate | ( | EZInputDelegate | del | ) | [virtual, inherited] |
void SpriteBase.AddSpriteResizedDelegate | ( | SpriteResizedDelegate | del | ) | [inherited] |
Adds the delegate to be called when the sprite is resized.
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).
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.
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.
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.
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.
c | The control to be copied. |
virtual void SpriteRoot.Copy | ( | SpriteRoot | s | ) | [virtual, inherited] |
Copies all the vital attributes of another sprite.
s | Source sprite to be copied. |
override void UIRadioBtn.Copy | ( | SpriteRoot | s, | |
ControlCopyFlags | flags | |||
) | [virtual] |
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.
s | Reference to the control whose settings are to be copied to this control. |
Reimplemented from AutoSpriteControlBase.
Reimplemented in UIPanelTab.
override void UIRadioBtn.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.
s | Reference to the control whose settings are to be copied to this control. |
Reimplemented from AutoSpriteControlBase.
Reimplemented in UIPanelTab.
virtual void AutoSpriteBase.CopyAll | ( | SpriteRoot | s | ) | [virtual, inherited] |
Copies all the attributes of another sprite, including its edit-time TextureAnimations.
s | A reference to the sprite to be copied. |
static UIRadioBtn UIRadioBtn.Create | ( | string | name, | |
Vector3 | pos, | |||
Quaternion | rotation | |||
) | [static] |
Creates a GameObject and attaches this component type to it.
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. |
Reimplemented in UIPanelTab.
static UIRadioBtn UIRadioBtn.Create | ( | string | name, | |
Vector3 | pos | |||
) | [static] |
Creates a GameObject and attaches this component type to it.
name | Name to give to the new GameObject. | |
pos | Position, in world space, where the new object should be created. |
Reimplemented in UIPanelTab.
void AutoSpriteControlBase.DefaultDragUpdatePosition | ( | POINTER_INFO | ptr | ) | [inherited] |
The default method of updating the drag position.
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.
anim | Reference to the animation to play. |
void AutoSpriteBase.DoAnim | ( | string | name | ) | [inherited] |
Plays the specified animation only if it is not already playing.
name | Name of the animation to play. |
void AutoSpriteBase.DoAnim | ( | int | index | ) | [inherited] |
Plays the specified animation only if it is not already playing.
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.
name | Name of the animation sought. |
Vector3 SpriteRoot.GetCenterPoint | ( | ) | [inherited] |
Gets the center point of the sprite, taking into account the actual positions of vertices.
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.
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.
stateName | The name of the state sought. |
Implements SpriteRoot.
override string UIRadioBtn.GetStateLabel | ( | int | index | ) | [virtual] |
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).
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.
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.
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.
bool SpriteRoot.IsHidden | ( | ) | [inherited] |
Returns whether the sprite is currently set to be hideAtStart (whether its mesh renderer component is enabled).
virtual void AutoSpriteControlBase.OnInput | ( | POINTER_INFO | ptr | ) | [virtual, inherited] |
This is where input handling code should go in any derived class.
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 UIRadioBtn.OnInput | ( | ref POINTER_INFO | ptr | ) | [virtual] |
This is where input handling code should go in any derived class.
ptr | POINTER_INFO struct that contains information on the pointer that caused the event, as well as the event that occurred. |
Reimplemented from AutoSpriteControlBase.
Reimplemented in UIPanelTab.
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()!
x | The x-coordinate to convert. | |
y | The y-coordinate to convert. |
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()!
xy | The coordinates to convert. |
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()!
x | The X-value to convert. | |
y | The Y-value to convert. |
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()!
xy | The values to convert. |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
del | The delegate to add. |
Implements IEZDragDrop.
virtual void AutoSpriteControlBase.RemoveInputDelegate | ( | EZInputDelegate | del | ) | [virtual, inherited] |
Removes a method added with AddInputDelegate().
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.
del | The delegate to be removed. |
virtual void AutoSpriteControlBase.RemoveValueChangedDelegate | ( | EZValueChangedDelegate | del | ) | [virtual, inherited] |
Removes a method added with AddValueChangedDelegate().
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.
a | The anchor method to use. |
void SpriteBase.SetAnimCompleteDelegate | ( | AnimCompleteDelegate | del | ) | [inherited] |
Sets the delegate to be called upon animation completion.
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.
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.
c |
Reimplemented from SpriteRoot.
virtual void SpriteRoot.SetColor | ( | Color | c | ) | [virtual, inherited] |
Sets the sprite's color to the specified color.
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.
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.
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.
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).
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.
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.
fps | The new framerate, in frames per second. |
void UIRadioBtn.SetGroup | ( | int | groupID | ) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.
ID | The ID of the group to which this radio will be assigned. Can be an arbitrary integer, or if useParentForGrouping is true, the hashcode of the parent transform. |
void UIRadioBtn.SetGroup | ( | Transform | parent | ) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.
ID | The parent transform of the radio button. |
void UIRadioBtn.SetGroup | ( | GameObject | parent | ) |
Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.
ID | The parent object of the radio button. |
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.
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.
mat | The new material. |
void SpriteRoot.SetOffset | ( | Vector3 | o | ) | [inherited] |
Sets the offset of the sprite from its GameObject. See offset.
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.
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.
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.
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.
index | The zero-based index of the desired state/animation. |
Implements SpriteRoot.
override void UIRadioBtn.SetStateLabel | ( | int | index, | |
string | label | |||
) | [virtual] |
Sets the string for the specified state label.
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.
tex | The new texture. |
void AutoSpriteBase.Setup | ( | float | w, | |
float | h, | |||
Material | material | |||
) | [inherited] |
Sets up the essential elements of a sprite.
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.
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.
nextFrame | A Rect containing the new UV coordinates. |
void SpriteRoot.SetUVsFromPixelCoords | ( | Rect | pxCoords | ) | [inherited] |
Sets the sprite's UVs from pixel coordinates.
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.
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.
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.
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.
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.
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.
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] |
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.
ANCHOR_METHOD SpriteRoot.anchor = ANCHOR_METHOD.TEXTURE_OFFSET [inherited] |
UVAnimation [] AutoSpriteBase.animations [inherited] |
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.
float AutoSpriteControlBase.cancelDragDuration = -1f [inherited] |
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.
The default value of the button.
float UIRadioBtn.delay |
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.
bool UIRadioBtn.disableHoverEffect = false |
When false, any "layer" that is set will be assumed to contain states for "Over" and "Active" so as to provide visuals for the "Hover" effect, as well as the "Active" (pressed) effect. When true, however, the layers are assumed to only be used to mirror the control's current state/value, and will not provide "Over" and "Active" state appearances.
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.
bool AutoSpriteControlBase.includeTextInAutoCollider = true [inherited] |
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 [] UIRadioBtn.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.
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).
SpriteManager SpriteRoot.manager [inherited] |
Reference to the manager which will manage this sprite, provided managed is set to true.
string UIRadioBtn.methodToInvoke = "" |
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.
The numbered group to which this radio button belongs. Buttons that share a group will be mutually exclusive to one another. This value is only available if RADIOBTN_USE_PARENT is not defined. Otherwise, by default, radio buttons group themselves according to a common parent GameObject.
MonoBehaviour UIRadioBtn.scriptWithMethodToInvoke |
Reference to the script component with the method you wish to invoke when the button changes states.
AudioSource UIRadioBtn.soundToPlay |
Sound that will be played when the button is tapped.
SpriteText AutoSpriteControlBase.spriteText [inherited] |
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.
bool UIRadioBtn.useParentForGrouping = true |
When true, the radio button will group itself with other radio buttons based on whether they share the same parent GameObject.
POINTER_INFO.INPUT_EVENT UIRadioBtn.whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP |
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".
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 UIRadioBtn.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.
Reimplemented from AutoSpriteControlBase.
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.
override CSpriteFrame UIRadioBtn.DefaultFrame [get] |
Gets the default frame of the sprite object. This is the appearance the sprite is to have in the editor.
Reimplemented from AutoSpriteBase.
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 [] UIRadioBtn.States [get, set] |
Accessor for the sprite's various states as defined in the editor (not used at runtime).
Reimplemented from AutoSpriteBase.
override string UIRadioBtn.Text [get, set] |
Sets the text to be displayed in this control.
Reimplemented from AutoSpriteControlBase.
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.
virtual bool UIRadioBtn.Value [get, set] |
Provides access to the boolean value of the button.
Reimplemented in UIPanelTab.