PlayerDetailsAttributeVM.Gen.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 PlayerDetailsAttributeVM : FguiViewModel
  19. {
  20. public CommonBackGroundNestedView Background { get; private set; }
  21. public PlayerAttributeListView BaseAttributeList { get; private set; }
  22. public PlayerAttributeListView BattleAttributeList { get; private set; }
  23. public PlayerAttributeListView BattleResistanceAttrList { get; private set; }
  24. public PlayerSpecialAttributeListView SpecialAttributeList { get; private set; }
  25. protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
  26. {
  27. Background = adapter.CreateNested<CommonBackGroundNestedView>(new FguiNested(panel.GetChild("Background").asCom), true);
  28. AddChild(Background);
  29. BaseAttributeList = adapter.CreateNested<PlayerAttributeListView>(new FguiNested(panel.GetChild("BaseAttributeList").asCom), true);
  30. AddChild(BaseAttributeList);
  31. BattleAttributeList = adapter.CreateNested<PlayerAttributeListView>(new FguiNested(panel.GetChild("BattleAttributeList").asCom), true);
  32. AddChild(BattleAttributeList);
  33. BattleResistanceAttrList = adapter.CreateNested<PlayerAttributeListView>(new FguiNested(panel.GetChild("BattleResistanceAttrList").asCom), true);
  34. AddChild(BattleResistanceAttrList);
  35. SpecialAttributeList = adapter.CreateNested<PlayerSpecialAttributeListView>(new FguiNested(panel.GetChild("SpecialAttributeList").asCom), true);
  36. AddChild(SpecialAttributeList);
  37. }
  38. }
  39. }