Inherits ControlBase.
Public Types | |
enum | CONTROL_STATE { NORMAL, OVER, ACTIVE, DISABLED } |
Indicates the state of the button. More... | |
Public Member Functions | |
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. | |
void | Copy (IControl c) |
Copies the the specified control. | |
void | Copy (IControl c, ControlCopyFlags flags) |
Copies the specified parts of the specified control. | |
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. | |
Static Public Member Functions | |
static UIButton3D | Create (string name, Vector3 pos) |
Creates a GameObject and attaches this component type to it. | |
static UIButton3D | Create (string name, Vector3 pos, Quaternion rotation) |
Creates a GameObject and attaches this component type to it. | |
Public Attributes | |
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 |
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. | |
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. | |
object | Data [get, set] |
Accessor for the data member to comply with the IControl interface. | |
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. | |
bool | IsDraggable [get, set] |
Indicates whether the object can be dragged as part of a drag & drop operation. | |
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. | |
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. |
Button class that allows you to invoke a specified method on a specified component script. This differs from UIButton in that it has no sprite graphics and instead is intended to be used in conjuction with an existing 3D object in the scene.
void ControlBase.AddDragDropDelegate | ( | EZDragDropDelegate | del | ) | [inherited] |
Adds a delegate to be called with drag and drop notifications.
del | The delegate to add. |
void ControlBase.CancelDrag | ( | ) | [inherited] |
Cancels any pending drag and drop operation.
void ControlBase.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.
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. |
static UIButton3D UIButton3D.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. |
static UIButton3D UIButton3D.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. |
void ControlBase.DefaultDragUpdatePosition | ( | POINTER_INFO | ptr | ) | [inherited] |
The default method of updating the drag position.
ptr | The pointer info struct for the pointer dragging the object. |
void ControlBase.DoDefaultCancelDrag | ( | ) | [inherited] |
Performs the default cancel drag animation.
void ControlBase.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. |
void ControlBase.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. |
void ControlBase.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. |
virtual void ControlBase.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.
bool UIButton3D.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.
float ControlBase.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 ControlBase.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.
object ControlBase.data [inherited] |
Can hold a reference to any data that the developer wishes to be associated with the control.
float UIButton3D.delay |
Delay, in seconds, between the time the control is tapped and the time the method is executed.
bool ControlBase.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 ControlBase.DittoString = "[\"]" [inherited] |
String whose meaning is to keep the previous state's label.
float ControlBase.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.
LayerMask ControlBase.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.
bool ControlBase.includeTextInAutoCollider [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 ControlBase.isDraggable = false [inherited] |
Indicates whether the object can be dragged as part of a drag & drop operation.
string UIButton3D.methodToInvoke = "" |
A string containing the name of the method to be invoked.
bool UIButton3D.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".
MonoBehaviour UIButton3D.scriptWithMethodToInvoke |
Reference to the script component with the method you wish to invoke when the button is tapped.
AudioSource UIButton3D.soundOnClick |
Sound that will be played when the button is activated (pressed).
AudioSource UIButton3D.soundOnOver |
Sound that will be played when the button is is in an "over" state (mouse over).
SpriteText ControlBase.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 ControlBase.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 ControlBase.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 UIButton3D.whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP |
Sets what event should have occurred to invoke the associated MonoBehaviour method. Defaults to TAP.
float ControlBase.CancelDragDuration [get, set, inherited] |
The duration of the easing animation when a drag and drop operation is canceled.
EZAnimation.EASING_TYPE ControlBase.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.
override bool UIButton3D.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.
Implements IUIObject.
CONTROL_STATE UIButton3D.controlState [get] |
Gets the current state of the button.
object ControlBase.Data [get, set, inherited] |
Accessor for the data member to comply with the IControl interface.
virtual bool ControlBase.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.
float ControlBase.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.
bool ControlBase.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.
LayerMask ControlBase.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.
GameObject ControlBase.DropTarget [get, set, inherited] |
The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.
bool ControlBase.IsDraggable [get, set, inherited] |
Indicates whether the object can be dragged as part of a drag & drop operation.
bool ControlBase.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.
bool ControlBase.UseDefaultCancelDragAnim [get, set, inherited] |
Indicates whether to use the default drag canceling animation.