using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using System.Collections;
namespace UIWidgets
{
///
/// SlideBlock handle.
///
public class SlideBlockHandle : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler {
///
/// BeginDrag event.
///
public PointerUnityEvent BeginDragEvent = new PointerUnityEvent();
///
/// EndDrag event.
///
public PointerUnityEvent EndDragEvent = new PointerUnityEvent();
///
/// Drag event.
///
public PointerUnityEvent DragEvent = new PointerUnityEvent();
///
/// Called by a BaseInputModule before a drag is started.
///
/// Event data.
public void OnBeginDrag(PointerEventData eventData)
{
BeginDragEvent.Invoke(eventData);
}
///
/// Called by a BaseInputModule when a drag is ended.
///
/// Event data.
public void OnEndDrag(PointerEventData eventData)
{
EndDragEvent.Invoke(eventData);
}
///
/// When draging is occuring this will be called every time the cursor is moved.
///
/// Event data.
public void OnDrag(PointerEventData eventData)
{
DragEvent.Invoke(eventData);
}
}
}