DatePickerDropDownTextMeshPro.cs 689 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Bitsplash.DatePicker
  7. {
  8. [Serializable]
  9. public class DatePickerDropDownTextMeshPro : DatePickerDropDownBase
  10. {
  11. public TMPro.TextMeshProUGUI Label= null;
  12. public Action<string> GetDateString;
  13. protected override void SetText(string text)
  14. {
  15. if (Label != null)
  16. Label.text = text;
  17. GetDateString?.Invoke(text);
  18. }
  19. public void SetLabelText(string text)
  20. {
  21. if (Label != null)
  22. Label.text = text;
  23. }
  24. }
  25. }