SRText.cs 561 B

1234567891011121314151617181920212223242526
  1. namespace SRF.UI
  2. {
  3. using System;
  4. using Internal;
  5. using UnityEngine;
  6. using UnityEngine.UI;
  7. /// <summary>
  8. /// Adds a LayoutDirty callback to the default Text component.
  9. /// </summary>
  10. [AddComponentMenu(ComponentMenuPaths.SRText)]
  11. public class SRText : Text
  12. {
  13. public event Action<SRText> LayoutDirty;
  14. public override void SetLayoutDirty()
  15. {
  16. base.SetLayoutDirty();
  17. if (LayoutDirty != null)
  18. {
  19. LayoutDirty(this);
  20. }
  21. }
  22. }
  23. }