MainHomePanelVM.Gen.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// #PropertyDefineArea 属性定义区域
  5. /// #PropertyAssignArea 属性赋值区域
  6. /// #ComponentType 组件类型
  7. /// #PropertyName 属性名字
  8. /// 该脚本由模板创建,不可编辑
  9. /// created by cb 2024
  10. using FairyGUI;
  11. using XGame.Framework.FGUI;
  12. using XGame.Framework.UI;
  13. namespace FL.FGUI
  14. {
  15. /// <summary>
  16. /// 该脚本由模板创建,不可修改,不可编辑
  17. /// </summary>
  18. public partial class MainHomePanelVM : FguiViewModel
  19. {
  20. public Controller SysMenuCtrl { get; private set; }
  21. public GLoader PlayerHead { get; private set; }
  22. public GLoader PlayerPowerIcon { get; private set; }
  23. public GTextField PlayerLvTxt { get; private set; }
  24. public GTextField PlayerNameTxt { get; private set; }
  25. public CommonComCurrencyNestedView GoldNested { get; private set; }
  26. public CommonComCurrencyNestedView DiamondNested { get; private set; }
  27. public GTextField PlayerPowerTxt { get; private set; }
  28. public GButton SysMenuBtn { get; private set; }
  29. public GList RightHdList { get; private set; }
  30. public GList LeftMenuBtnsList { get; private set; }
  31. public GGroup LeftMenuBtns { get; private set; }
  32. public GGroup Top { get; private set; }
  33. public GButton FriendBtn { get; private set; }
  34. public GButton MailBtn { get; private set; }
  35. public GButton NoticeBtn { get; private set; }
  36. public GButton SettingBtn { get; private set; }
  37. public GButton ExchangeBtn { get; private set; }
  38. public GButton BagBtn { get; private set; }
  39. public GGroup SysMenu { get; private set; }
  40. public GButton MapRewardBtn { get; private set; }
  41. public GGroup Bottom { get; private set; }
  42. protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
  43. {
  44. SysMenuCtrl = panel.GetController("SysMenuCtrl");
  45. PlayerHead = panel.GetChild("PlayerHead") as GLoader;
  46. PlayerPowerIcon = panel.GetChild("PlayerPowerIcon") as GLoader;
  47. PlayerLvTxt = panel.GetChild("PlayerLvTxt") as GTextField;
  48. PlayerNameTxt = panel.GetChild("PlayerNameTxt") as GTextField;
  49. GoldNested = adapter.CreateNested<CommonComCurrencyNestedView>(new FguiNested(panel.GetChild("GoldNested").asCom), true);
  50. AddChild(GoldNested);
  51. DiamondNested = adapter.CreateNested<CommonComCurrencyNestedView>(new FguiNested(panel.GetChild("DiamondNested").asCom), true);
  52. AddChild(DiamondNested);
  53. PlayerPowerTxt = panel.GetChild("PlayerPowerTxt") as GTextField;
  54. SysMenuBtn = panel.GetChild("SysMenuBtn") as GButton;
  55. RightHdList = panel.GetChild("RightHdList") as GList;
  56. RightHdList.Init(typeof(MainHdListItemView), adapter.CreateListItem);
  57. LeftMenuBtnsList = panel.GetChild("LeftMenuBtnsList") as GList;
  58. LeftMenuBtnsList.Init(typeof(MainHdListItemView), adapter.CreateListItem);
  59. LeftMenuBtns = panel.GetChild("LeftMenuBtns") as GGroup;
  60. Top = panel.GetChild("Top") as GGroup;
  61. FriendBtn = panel.GetChild("FriendBtn") as GButton;
  62. MailBtn = panel.GetChild("MailBtn") as GButton;
  63. NoticeBtn = panel.GetChild("NoticeBtn") as GButton;
  64. SettingBtn = panel.GetChild("SettingBtn") as GButton;
  65. ExchangeBtn = panel.GetChild("ExchangeBtn") as GButton;
  66. BagBtn = panel.GetChild("BagBtn") as GButton;
  67. SysMenu = panel.GetChild("SysMenu") as GGroup;
  68. MapRewardBtn = panel.GetChild("MapRewardBtn") as GButton;
  69. Bottom = panel.GetChild("Bottom") as GGroup;
  70. }
  71. }
  72. }