You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
449 B
22 lines
449 B
using UnityEngine.UI;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class MScrollRect : ScrollRect
|
|
{
|
|
public bool isDrag;
|
|
public override void OnDrag(PointerEventData eventData)
|
|
{
|
|
base.OnDrag(eventData);
|
|
isDrag = true;
|
|
}
|
|
|
|
public override void OnEndDrag(PointerEventData eventData)
|
|
{
|
|
base.OnEndDrag(eventData);
|
|
if (normalizedPosition.y <= 0)
|
|
{
|
|
isDrag = false;
|
|
}
|
|
}
|
|
}
|