PartnerMwBaseItemCtrl.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using FairyGUI;
  7. using FL.Data;
  8. using XGame.Database;
  9. using XGame;
  10. using XGame.Framework.UI;
  11. namespace FL.FGUI
  12. {
  13. /// <summary>
  14. /// UI逻辑处理类
  15. /// </summary>
  16. /// <typeparam name=""></typeparam>
  17. public partial class PartnerMwBaseItemCtrl : UIController<PartnerMwBaseItemVM>
  18. {
  19. protected override void OnEnable(object intent)
  20. {
  21. AddUIListenres();
  22. }
  23. protected override void OnDisable()
  24. {
  25. RemoveUIListenres();
  26. }
  27. #region UI事件
  28. private void AddUIListenres()
  29. {
  30. }
  31. private void RemoveUIListenres()
  32. {
  33. }
  34. #endregion
  35. public void SetEpiIcon(int id)
  36. {
  37. var table = EpigraphTableRepo.Get(id);
  38. if (table == null)
  39. {
  40. Log.Error($"铭文表不存在id:{id}");
  41. return;
  42. }
  43. VM.Icon.url = table.Icon;
  44. //var info = EpigraphData.Instance.GetEpigraphAttrByTableId(id);
  45. //if (info != null && info.StarLv > 0)
  46. //{
  47. // VM.ShowStar.selectedIndex = 0;
  48. // var curStarLv = EpigraphData.Instance.GetStarStep(info.StarLv);
  49. // VM.Title.text = EpigraphData.Instance.GetCurCtepStarLv(info.StarLv).ToString();
  50. // VM.StarIcon.url = AddressableDefine.PartnerStarIconName(curStarLv);
  51. //}
  52. //else
  53. //{
  54. // VM.ShowStar.selectedIndex = 1;
  55. //}
  56. VM.BgLoader.url = AddressableDefine.EpigraphMwPzDi(table.Quality);
  57. }
  58. }
  59. }