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.

31 lines
713 B

  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. }