Class ButtonHoldTrigger
Listener for the background button for each setting.
Inheritance
object
ButtonHoldTrigger
Implements
IPointerDownHandler
IPointerUpHandler
Namespace: AS2.UI
Assembly: .dll
Syntax
public class ButtonHoldTrigger : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
Fields
| Edit this page View SourcemouseClickEvent
Callback for when the button has been pressed and has just been released. The float parameter specifies the time in seconds for which the button was held down.
Declaration
public Action<float> mouseClickEvent
Field Value
Type | Description |
---|---|
Action<float> |
pressed
Declaration
private bool pressed
Field Value
Type | Description |
---|---|
bool |
timestampPointerDown
Declaration
private float timestampPointerDown
Field Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceGetPressedTime()
Button press duration.
Declaration
public float GetPressedTime()
Returns
Type | Description |
---|---|
float | Returns the time the button is being held down. |
OnPointerDown(PointerEventData)
Declaration
public void OnPointerDown(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
OnPointerUp(PointerEventData)
Declaration
public void OnPointerUp(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
PointerEventData | eventData |
Implements
IPointerDownHandler
IPointerUpHandler