CommonTipsItemCtrl.cs 779 B

123456789101112131415161718192021222324252627282930313233
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using System;
  7. using XGame.Framework.UI;
  8. namespace FL.FGUI
  9. {
  10. /// <summary>
  11. /// UI逻辑处理类
  12. /// </summary>
  13. /// <typeparam name=""></typeparam>
  14. public partial class CommonTipsItemCtrl : UIController<CommonTipsItemVM>
  15. {
  16. protected override void OnEnable(object intent)
  17. {
  18. }
  19. protected override void OnDisable()
  20. {
  21. }
  22. public void ShowTips(string tips, Action onComplated)
  23. {
  24. VM.TipsLabel.text = tips;
  25. VM.MoveClip.Play(() =>
  26. {
  27. onComplated.SafeInvoke();
  28. });
  29. }
  30. }
  31. }