TMP_ScrollbarEventHandler.cs 713 B

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. using UnityEngine.Events;
  3. using UnityEngine.EventSystems;
  4. using System;
  5. namespace TMPro
  6. {
  7. public class TMP_ScrollbarEventHandler : MonoBehaviour, IPointerClickHandler, ISelectHandler, IDeselectHandler
  8. {
  9. public bool isSelected;
  10. public void OnPointerClick(PointerEventData eventData)
  11. {
  12. Debug.Log("Scrollbar click...");
  13. }
  14. public void OnSelect(BaseEventData eventData)
  15. {
  16. Debug.Log("Scrollbar selected");
  17. isSelected = true;
  18. }
  19. public void OnDeselect(BaseEventData eventData)
  20. {
  21. Debug.Log("Scrollbar De-Selected");
  22. isSelected = false;
  23. }
  24. }
  25. }