UIRoleInfoPopView_Generate.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. ---@class UIRoleInfoPop__Generate_scrollView
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public loopListView SuperScrollView.LoopListView
  4. ---@class UIRoleInfoPop__Generate_btnClose
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIRoleInfoPop__Generate_textTitle
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text TMPro.TextMeshProUGUI
  10. ---@class UIRoleInfoPop__Generate_AnyBtn
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UIRoleInfoPop__Generate
  14. ---@field private gameObject UnityEngine.GameObject
  15. ---@field private transform UnityEngine.Transform
  16. ---@field private AnyBtn UIRoleInfoPop__Generate_AnyBtn
  17. ---@field private textTitle UIRoleInfoPop__Generate_textTitle
  18. ---@field private btnClose UIRoleInfoPop__Generate_btnClose
  19. ---@field private scrollView UIRoleInfoPop__Generate_scrollView
  20. ---@field private infoDscItem UnityEngine.GameObject
  21. local UIRoleInfoPopView = class("UIRoleInfoPopView", require("UIViewBase"))
  22. function UIRoleInfoPopView:ctor()
  23. end
  24. ---@private
  25. function UIRoleInfoPopView:SetActive(result)
  26. self.gameObject:SetActive(result)
  27. end
  28. ---@private
  29. function UIRoleInfoPopView:InitGenerate(Root, data)
  30. self.transform = Root
  31. self.inited = true
  32. if self.super.Init then
  33. self.super.Init(self)
  34. end
  35. local tmp
  36. self:InitGenerate__1(Root,data)
  37. self:InitGenerate__2(Root,data)
  38. self:InitGenerate__3(Root,data)
  39. self:InitGenerate__4(Root,data)
  40. self:InitGenerate__5(Root,data)
  41. end
  42. ---@private
  43. function UIRoleInfoPopView:InitGenerate__1(Root, data)
  44. --[[
  45. UIAnimator/Alpha
  46. --]]
  47. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  48. if tolua.getpeer(tmp) == nil then
  49. tolua.setpeer(tmp, {})
  50. end
  51. self.AnyBtn = tmp
  52. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  53. end
  54. ---@private
  55. function UIRoleInfoPopView:InitGenerate__2(Root, data)
  56. --[[
  57. UIAnimator/Window/Bg/TextTitle
  58. --]]
  59. local tmp = Root:Find("UIAnimator/Window/Bg/TextTitle").gameObject
  60. if tolua.getpeer(tmp) == nil then
  61. tolua.setpeer(tmp, {})
  62. end
  63. self.textTitle = tmp
  64. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  65. end
  66. ---@private
  67. function UIRoleInfoPopView:InitGenerate__3(Root, data)
  68. --[[
  69. UIAnimator/Window/Bg/CloseBox/BtnClose
  70. --]]
  71. local tmp = Root:Find("UIAnimator/Window/Bg/CloseBox/BtnClose").gameObject
  72. if tolua.getpeer(tmp) == nil then
  73. tolua.setpeer(tmp, {})
  74. end
  75. self.btnClose = tmp
  76. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  77. end
  78. ---@private
  79. function UIRoleInfoPopView:InitGenerate__4(Root, data)
  80. --[[
  81. UIAnimator/Window/Bg/InfoBox/ScrollView
  82. --]]
  83. local tmp = Root:Find("UIAnimator/Window/Bg/InfoBox/ScrollView").gameObject
  84. if tolua.getpeer(tmp) == nil then
  85. tolua.setpeer(tmp, {})
  86. end
  87. self.scrollView = tmp
  88. tmp.loopListView = tmp:GetComponent(Enum.TypeInfo.LoopListView)
  89. end
  90. ---@private
  91. function UIRoleInfoPopView:InitGenerate__5(Root, data)
  92. --[[
  93. UIAnimator/Window/Bg/InfoBox/ScrollView/Viewport/Content/InfoDscItem
  94. --]]
  95. local tmp = Root:Find("UIAnimator/Window/Bg/InfoBox/ScrollView/Viewport/Content/InfoDscItem").gameObject
  96. if tolua.getpeer(tmp) == nil then
  97. tolua.setpeer(tmp, {})
  98. end
  99. self.infoDscItem = CommonUtil.BindGridViewItem2LuaStatic("InfoDscItem", tmp)
  100. self.infoDscItem.prefabName = "InfoDscItem"
  101. end
  102. ---@private
  103. function UIRoleInfoPopView:GenerateDestroy()
  104. if tolua.getpeer(self.AnyBtn) ~= nil then
  105. tolua.setpeer(self.AnyBtn, nil)
  106. end
  107. self.AnyBtn = nil
  108. if tolua.getpeer(self.textTitle) ~= nil then
  109. tolua.setpeer(self.textTitle, nil)
  110. end
  111. self.textTitle = nil
  112. if tolua.getpeer(self.btnClose) ~= nil then
  113. tolua.setpeer(self.btnClose, nil)
  114. end
  115. self.btnClose = nil
  116. if tolua.getpeer(self.scrollView) ~= nil then
  117. tolua.setpeer(self.scrollView, nil)
  118. end
  119. self.scrollView = nil
  120. if self.infoDscItem.GenerateDestroy ~= nil then
  121. self.infoDscItem:GenerateDestroy()
  122. end
  123. if tolua.getpeer(self.infoDscItem) ~= nil then
  124. tolua.setpeer(self.infoDscItem, nil)
  125. end
  126. self.infoDscItem = nil
  127. self.transform = nil
  128. self.gameObject = nil
  129. self.inited = false
  130. end
  131. return UIRoleInfoPopView