using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using System;
using UnityEngine.UI;
public class ColorPickClick : MonoBehaviour,IPointerDownHandler,IDragHandler
{
    // Start is called before the first frame update
    void Start()
    {
        
    }
    public Button.ButtonClickedEvent Click;

    public Vector3 ClickPoint { get; set; }
    public void OnPointerDown(PointerEventData eventData)
    {
        var rect = transform as RectTransform;
        ClickPoint = rect.InverseTransformPoint(eventData.position);
        Click.Invoke();
    }
    public void OnDrag(PointerEventData eventData)
    {
        var rect = transform as RectTransform;
        ClickPoint = rect.InverseTransformPoint(eventData.position);
        Click.Invoke();
    }
    // Update is called once per frame
    void Update()
    {
        
    }
}
