Inherits ControlBase.
Public Member Functions | |
int | ToggleState () |
Toggles the button's state to the next in the sequence and returns the resulting state number. | |
virtual void | SetToggleState (int s) |
Sets the button's toggle state to the specified state. | |
virtual void | SetToggleState (string stateName) |
Sets the button's toggle state to the specified state. Does nothing if the specified state is not found. | |
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 UIStateToggleBtn3D | Create (string name, Vector3 pos) |
Creates a GameObject and attaches this component type to it. | |
static UIStateToggleBtn3D | Create (string name, Vector3 pos, Quaternion rotation) |
Creates a GameObject and attaches this component type to it. | |
Public Attributes | |
int | defaultState |
Zero-based index of the state that should be the default, initial state. | |
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. | |
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 | |
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. | |
int | StateNum [get] |
Returns the zero-based number/index of the current state. | |
string | StateName [get] |
Returns the name of the current state. | |
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 toggle sequentially through an arbitrary number of states. This differs from UIStateToggleBtn 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 UIStateToggleBtn3D UIStateToggleBtn3D.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 UIStateToggleBtn3D UIStateToggleBtn3D.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 UIStateToggleBtn3D.SetToggleState | ( | string | stateName | ) | [virtual] |
Sets the button's toggle state to the specified state. Does nothing if the specified state is not found.
s | The name of the desired state. |
virtual void UIStateToggleBtn3D.SetToggleState | ( | int | s | ) | [virtual] |
Sets the button's toggle state to the specified state.
s | The zero-based state number/index. |
int UIStateToggleBtn3D.ToggleState | ( | ) |
Toggles the button's state to the next in the sequence and returns the resulting state number.
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.
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.
Zero-based index of the state that should be the default, initial state.
float UIStateToggleBtn3D.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 UIStateToggleBtn3D.methodToInvoke = "" |
A string containing the name of the method to be invoked.
MonoBehaviour UIStateToggleBtn3D.scriptWithMethodToInvoke |
Reference to the script component with the method you wish to invoke when the button changes states.
AudioSource UIStateToggleBtn3D.soundToPlay |
Sound that will be played when the button is tapped.
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 UIStateToggleBtn3D.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 UIStateToggleBtn3D.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.
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.
string UIStateToggleBtn3D.StateName [get] |
Returns the name of the current state.
int UIStateToggleBtn3D.StateNum [get] |
Returns the zero-based number/index of the current state.
bool ControlBase.UseDefaultCancelDragAnim [get, set, inherited] |
Indicates whether to use the default drag canceling animation.