UICardListTipsView_Generate.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. ---@class UICardListTips__Generate_cardScrollView_content
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public verticalLayoutGroup UnityEngine.UI.VerticalLayoutGroup
  4. ---@class UICardListTips__Generate_cardScrollView
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  7. ---@field public content UICardListTips__Generate_cardScrollView_content
  8. ---@class UICardListTips__Generate_btnClose
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public button UnityEngine.UI.Button
  11. ---@class UICardListTips__Generate_AnyBtn
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public button UnityEngine.UI.Button
  14. ---@class UICardListTips__Generate_uIAnimator
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public animator UnityEngine.Animator
  17. ---@class UICardListTips__Generate
  18. ---@field private gameObject UnityEngine.GameObject
  19. ---@field private transform UnityEngine.Transform
  20. ---@field private uIAnimator UICardListTips__Generate_uIAnimator
  21. ---@field private AnyBtn UICardListTips__Generate_AnyBtn
  22. ---@field private window UnityEngine.GameObject
  23. ---@field private btnClose UICardListTips__Generate_btnClose
  24. ---@field private cardListEquippedItem UnityEngine.GameObject
  25. ---@field private cardSlotBlank UnityEngine.GameObject
  26. ---@field private cardScrollView UICardListTips__Generate_cardScrollView
  27. ---@field private cardListItem UnityEngine.GameObject
  28. ---@field private dscBox UnityEngine.GameObject
  29. local UICardListTipsView = class("UICardListTipsView", require("UIViewBase"))
  30. function UICardListTipsView:ctor()
  31. end
  32. ---@private
  33. function UICardListTipsView:SetActive(result)
  34. self.gameObject:SetActive(result)
  35. end
  36. ---@private
  37. function UICardListTipsView:InitGenerate(Root, data)
  38. self.transform = Root
  39. self.inited = true
  40. if self.super.Init then
  41. self.super.Init(self)
  42. end
  43. local tmp
  44. self:InitGenerate__1(Root,data)
  45. self:InitGenerate__2(Root,data)
  46. self:InitGenerate__3(Root,data)
  47. self:InitGenerate__4(Root,data)
  48. self:InitGenerate__5(Root,data)
  49. self:InitGenerate__6(Root,data)
  50. self:InitGenerate__7(Root,data)
  51. self:InitGenerate__8(Root,data)
  52. self:InitGenerate__9(Root,data)
  53. self:InitGenerate__10(Root,data)
  54. end
  55. ---@private
  56. function UICardListTipsView:InitGenerate__1(Root, data)
  57. --[[
  58. UIAnimator
  59. --]]
  60. local tmp = Root:Find("UIAnimator").gameObject
  61. if tolua.getpeer(tmp) == nil then
  62. tolua.setpeer(tmp, {})
  63. end
  64. self.uIAnimator = tmp
  65. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  66. tmp.animator.logWarnings = false
  67. end
  68. ---@private
  69. function UICardListTipsView:InitGenerate__2(Root, data)
  70. --[[
  71. UIAnimator/Alpha
  72. --]]
  73. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  74. if tolua.getpeer(tmp) == nil then
  75. tolua.setpeer(tmp, {})
  76. end
  77. self.AnyBtn = tmp
  78. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  79. end
  80. ---@private
  81. function UICardListTipsView:InitGenerate__3(Root, data)
  82. --[[
  83. UIAnimator/Window
  84. --]]
  85. local tmp = Root:Find("UIAnimator/Window").gameObject
  86. if tolua.getpeer(tmp) == nil then
  87. tolua.setpeer(tmp, {})
  88. end
  89. self.window = tmp
  90. end
  91. ---@private
  92. function UICardListTipsView:InitGenerate__4(Root, data)
  93. --[[
  94. UIAnimator/Window/Bg/CloseBox/BtnClose
  95. --]]
  96. local tmp = Root:Find("UIAnimator/Window/Bg/CloseBox/BtnClose").gameObject
  97. if tolua.getpeer(tmp) == nil then
  98. tolua.setpeer(tmp, {})
  99. end
  100. self.btnClose = tmp
  101. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  102. end
  103. ---@private
  104. function UICardListTipsView:InitGenerate__5(Root, data)
  105. --[[
  106. UIAnimator/Window/Bg/TopItem/CardListEquippedItem
  107. --]]
  108. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/CardListEquippedItem").gameObject
  109. if tolua.getpeer(tmp) == nil then
  110. tolua.setpeer(tmp, {})
  111. end
  112. self.cardListEquippedItem = CommonUtil.BindGridViewItem2LuaStatic("CardListEquippedItem", tmp)
  113. self.cardListEquippedItem.prefabName = "CardListEquippedItem"
  114. end
  115. ---@private
  116. function UICardListTipsView:InitGenerate__6(Root, data)
  117. --[[
  118. UIAnimator/Window/Bg/TopItem/CardSlotBlank
  119. --]]
  120. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/CardSlotBlank").gameObject
  121. if tolua.getpeer(tmp) == nil then
  122. tolua.setpeer(tmp, {})
  123. end
  124. self.cardSlotBlank = tmp
  125. end
  126. ---@private
  127. function UICardListTipsView:InitGenerate__7(Root, data)
  128. --[[
  129. UIAnimator/Window/Bg/CardScrollView
  130. --]]
  131. local tmp = Root:Find("UIAnimator/Window/Bg/CardScrollView").gameObject
  132. if tolua.getpeer(tmp) == nil then
  133. tolua.setpeer(tmp, {})
  134. end
  135. self.cardScrollView = tmp
  136. tmp.loopVerticalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  137. end
  138. ---@private
  139. function UICardListTipsView:InitGenerate__8(Root, data)
  140. --[[
  141. UIAnimator/Window/Bg/CardScrollView/Viewport/CardListItem
  142. --]]
  143. local tmp = Root:Find("UIAnimator/Window/Bg/CardScrollView/Viewport/CardListItem").gameObject
  144. if tolua.getpeer(tmp) == nil then
  145. tolua.setpeer(tmp, {})
  146. end
  147. self.cardListItem = CommonUtil.BindGridViewItem2LuaStatic("CardListItem", tmp)
  148. self.cardListItem.prefabName = "CardListItem"
  149. end
  150. ---@private
  151. function UICardListTipsView:InitGenerate__9(Root, data)
  152. --[[
  153. UIAnimator/Window/Bg/CardScrollView/Viewport/Content
  154. --]]
  155. local tmp = Root:Find("UIAnimator/Window/Bg/CardScrollView/Viewport/Content").gameObject
  156. if tolua.getpeer(tmp) == nil then
  157. tolua.setpeer(tmp, {})
  158. end
  159. self.cardScrollView.content = tmp
  160. tmp.verticalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.VerticalLayoutGroup)
  161. end
  162. ---@private
  163. function UICardListTipsView:InitGenerate__10(Root, data)
  164. --[[
  165. UIAnimator/Window/Bg/CardScrollView/DscBox
  166. --]]
  167. local tmp = Root:Find("UIAnimator/Window/Bg/CardScrollView/DscBox").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.dscBox = tmp
  172. end
  173. ---@private
  174. function UICardListTipsView:GenerateDestroy()
  175. if tolua.getpeer(self.cardScrollView.content) ~= nil then
  176. tolua.setpeer(self.cardScrollView.content, nil)
  177. end
  178. if tolua.getpeer(self.uIAnimator) ~= nil then
  179. tolua.setpeer(self.uIAnimator, nil)
  180. end
  181. self.uIAnimator = nil
  182. if tolua.getpeer(self.AnyBtn) ~= nil then
  183. tolua.setpeer(self.AnyBtn, nil)
  184. end
  185. self.AnyBtn = nil
  186. if tolua.getpeer(self.window) ~= nil then
  187. tolua.setpeer(self.window, nil)
  188. end
  189. self.window = nil
  190. if tolua.getpeer(self.btnClose) ~= nil then
  191. tolua.setpeer(self.btnClose, nil)
  192. end
  193. self.btnClose = nil
  194. if self.cardListEquippedItem.GenerateDestroy ~= nil then
  195. self.cardListEquippedItem:GenerateDestroy()
  196. end
  197. if tolua.getpeer(self.cardListEquippedItem) ~= nil then
  198. tolua.setpeer(self.cardListEquippedItem, nil)
  199. end
  200. self.cardListEquippedItem = nil
  201. if tolua.getpeer(self.cardSlotBlank) ~= nil then
  202. tolua.setpeer(self.cardSlotBlank, nil)
  203. end
  204. self.cardSlotBlank = nil
  205. if tolua.getpeer(self.cardScrollView) ~= nil then
  206. tolua.setpeer(self.cardScrollView, nil)
  207. end
  208. self.cardScrollView = nil
  209. if self.cardListItem.GenerateDestroy ~= nil then
  210. self.cardListItem:GenerateDestroy()
  211. end
  212. if tolua.getpeer(self.cardListItem) ~= nil then
  213. tolua.setpeer(self.cardListItem, nil)
  214. end
  215. self.cardListItem = nil
  216. if tolua.getpeer(self.dscBox) ~= nil then
  217. tolua.setpeer(self.dscBox, nil)
  218. end
  219. self.dscBox = nil
  220. self.transform = nil
  221. self.gameObject = nil
  222. self.inited = false
  223. end
  224. return UICardListTipsView