PlayerJobPrrviewItemNestedCtrl.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using XGame.Database;
  7. using XGame.Framework.UI;
  8. namespace FL.FGUI
  9. {
  10. /// <summary>
  11. /// UI逻辑处理类
  12. /// </summary>
  13. /// <typeparam name=""></typeparam>
  14. public partial class PlayerJobPrrviewItemNestedCtrl : UIController<PlayerJobPrrviewItemNestedVM>
  15. {
  16. protected override void OnEnable(object intent)
  17. {
  18. AddUIListenres();
  19. }
  20. protected override void OnDisable()
  21. {
  22. RemoveUIListenres();
  23. }
  24. #region UI事件
  25. private void AddUIListenres()
  26. {
  27. }
  28. private void RemoveUIListenres()
  29. {
  30. }
  31. #endregion
  32. public void ShowUI(careerTable jobInfo, bool bSelect)
  33. {
  34. if (jobInfo == null) return;
  35. //VM.JobIcon.icon = jobInfo.Picture;
  36. VM.NameLabel.text = jobInfo.Name;
  37. VM.SelectCtrl.selectedIndex = bSelect ? 1 : 0;
  38. }
  39. }
  40. }