UIEquipListView_Generate.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. ---@class UIEquipList__Generate_content
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public verticalLayoutGroup UnityEngine.UI.VerticalLayoutGroup
  4. ---@class UIEquipList__Generate_equipListItem
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public rectTransform UnityEngine.RectTransform
  7. ---@field public layoutElement UnityEngine.UI.LayoutElement
  8. ---@field public contentSizeFitter UnityEngine.UI.ContentSizeFitter
  9. ---@class UIEquipList__Generate_scrollView
  10. ---@field public gameObject UnityEngine.GameObject
  11. ---@field public loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  12. ---@class UIEquipList__Generate_btnDown
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public button UnityEngine.UI.Button
  15. ---@class UIEquipList__Generate_btnChange
  16. ---@field public gameObject UnityEngine.GameObject
  17. ---@field public button UnityEngine.UI.Button
  18. ---@class UIEquipList__Generate_itemDsc
  19. ---@field public gameObject UnityEngine.GameObject
  20. ---@field public text UnityEngine.UI.Text
  21. ---@class UIEquipList__Generate_topItem_textName
  22. ---@field public gameObject UnityEngine.GameObject
  23. ---@field public uILocalizeScript UILocalizeScript
  24. ---@class UIEquipList__Generate_iconItem
  25. ---@field public gameObject UnityEngine.GameObject
  26. ---@field public rectTransform UnityEngine.RectTransform
  27. ---@field public layoutElement UnityEngine.UI.LayoutElement
  28. ---@class UIEquipList__Generate_topItem
  29. ---@field public gameObject UnityEngine.GameObject
  30. ---@field public textName UIEquipList__Generate_topItem_textName
  31. ---@field public grid UnityEngine.GameObject
  32. ---@class UIEquipList__Generate_btnClose
  33. ---@field public gameObject UnityEngine.GameObject
  34. ---@field public button UnityEngine.UI.Button
  35. ---@class UIEquipList__Generate_AnyBtn
  36. ---@field public gameObject UnityEngine.GameObject
  37. ---@field public button UnityEngine.UI.Button
  38. ---@class UIEquipList__Generate_uIAnimator
  39. ---@field public gameObject UnityEngine.GameObject
  40. ---@field public animator UnityEngine.Animator
  41. ---@class UIEquipList__Generate
  42. ---@field private gameObject UnityEngine.GameObject
  43. ---@field private transform UnityEngine.Transform
  44. ---@field private uIAnimator UIEquipList__Generate_uIAnimator
  45. ---@field private AnyBtn UIEquipList__Generate_AnyBtn
  46. ---@field private window UnityEngine.GameObject
  47. ---@field private btnClose UIEquipList__Generate_btnClose
  48. ---@field private topItem UIEquipList__Generate_topItem
  49. ---@field private equipListEquippedItem UnityEngine.GameObject
  50. ---@field private contentItem UnityEngine.GameObject
  51. ---@field private iconItem UIEquipList__Generate_iconItem
  52. ---@field private equipBaseAttrItem UnityEngine.GameObject
  53. ---@field private itemDsc UIEquipList__Generate_itemDsc
  54. ---@field private equiped UnityEngine.GameObject
  55. ---@field private btnChange UIEquipList__Generate_btnChange
  56. ---@field private btnDown UIEquipList__Generate_btnDown
  57. ---@field private equipBlank UnityEngine.GameObject
  58. ---@field private scrollView UIEquipList__Generate_scrollView
  59. ---@field private equipListItem UIEquipList__Generate_equipListItem
  60. ---@field private content UIEquipList__Generate_content
  61. local UIEquipListView = class("UIEquipListView", require("UIViewBase"))
  62. function UIEquipListView:ctor()
  63. end
  64. ---@private
  65. function UIEquipListView:SetActive(result)
  66. self.gameObject:SetActive(result)
  67. end
  68. ---@private
  69. function UIEquipListView:InitGenerate(Root, data)
  70. self.transform = Root
  71. self.inited = true
  72. if self.super.Init then
  73. self.super.Init(self)
  74. end
  75. local tmp
  76. self:InitGenerate__1(Root,data)
  77. self:InitGenerate__2(Root,data)
  78. self:InitGenerate__3(Root,data)
  79. self:InitGenerate__4(Root,data)
  80. self:InitGenerate__5(Root,data)
  81. self:InitGenerate__6(Root,data)
  82. self:InitGenerate__7(Root,data)
  83. self:InitGenerate__8(Root,data)
  84. self:InitGenerate__9(Root,data)
  85. self:InitGenerate__10(Root,data)
  86. self:InitGenerate__11(Root,data)
  87. self:InitGenerate__12(Root,data)
  88. self:InitGenerate__13(Root,data)
  89. self:InitGenerate__14(Root,data)
  90. self:InitGenerate__15(Root,data)
  91. self:InitGenerate__16(Root,data)
  92. self:InitGenerate__17(Root,data)
  93. self:InitGenerate__18(Root,data)
  94. self:InitGenerate__19(Root,data)
  95. self:InitGenerate__20(Root,data)
  96. end
  97. ---@private
  98. function UIEquipListView:InitGenerate__1(Root, data)
  99. --[[
  100. Root
  101. --]]
  102. end
  103. ---@private
  104. function UIEquipListView:InitGenerate__2(Root, data)
  105. --[[
  106. UIAnimator
  107. --]]
  108. local tmp = Root:Find("UIAnimator").gameObject
  109. if tolua.getpeer(tmp) == nil then
  110. tolua.setpeer(tmp, {})
  111. end
  112. self.uIAnimator = tmp
  113. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  114. tmp.animator.logWarnings = false
  115. end
  116. ---@private
  117. function UIEquipListView:InitGenerate__3(Root, data)
  118. --[[
  119. UIAnimator/Alpha
  120. --]]
  121. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.AnyBtn = tmp
  126. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  127. end
  128. ---@private
  129. function UIEquipListView:InitGenerate__4(Root, data)
  130. --[[
  131. UIAnimator/Window
  132. --]]
  133. local tmp = Root:Find("UIAnimator/Window").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.window = tmp
  138. end
  139. ---@private
  140. function UIEquipListView:InitGenerate__5(Root, data)
  141. --[[
  142. UIAnimator/Window/Bg/CloseBox/BtnClose
  143. --]]
  144. local tmp = Root:Find("UIAnimator/Window/Bg/CloseBox/BtnClose").gameObject
  145. if tolua.getpeer(tmp) == nil then
  146. tolua.setpeer(tmp, {})
  147. end
  148. self.btnClose = tmp
  149. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  150. end
  151. ---@private
  152. function UIEquipListView:InitGenerate__6(Root, data)
  153. --[[
  154. UIAnimator/Window/Bg/TopItem
  155. --]]
  156. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem").gameObject
  157. if tolua.getpeer(tmp) == nil then
  158. tolua.setpeer(tmp, {})
  159. end
  160. self.topItem = tmp
  161. end
  162. ---@private
  163. function UIEquipListView:InitGenerate__7(Root, data)
  164. --[[
  165. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem
  166. --]]
  167. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.equipListEquippedItem = tmp
  172. end
  173. ---@private
  174. function UIEquipListView:InitGenerate__8(Root, data)
  175. --[[
  176. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/ContentItem
  177. --]]
  178. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/ContentItem").gameObject
  179. if tolua.getpeer(tmp) == nil then
  180. tolua.setpeer(tmp, {})
  181. end
  182. self.contentItem = tmp
  183. end
  184. ---@private
  185. function UIEquipListView:InitGenerate__9(Root, data)
  186. --[[
  187. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/ContentItem/IconItem
  188. --]]
  189. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/ContentItem/IconItem").gameObject
  190. if tolua.getpeer(tmp) == nil then
  191. tolua.setpeer(tmp, {})
  192. end
  193. self.iconItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  194. self.iconItem.prefabName = "IconItem"
  195. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  196. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  197. end
  198. ---@private
  199. function UIEquipListView:InitGenerate__10(Root, data)
  200. --[[
  201. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/TextName
  202. --]]
  203. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/TextName").gameObject
  204. if tolua.getpeer(tmp) == nil then
  205. tolua.setpeer(tmp, {})
  206. end
  207. self.topItem.textName = tmp
  208. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  209. end
  210. ---@private
  211. function UIEquipListView:InitGenerate__11(Root, data)
  212. --[[
  213. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/EquipBaseAttrItem
  214. --]]
  215. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/EquipBaseAttrItem").gameObject
  216. if tolua.getpeer(tmp) == nil then
  217. tolua.setpeer(tmp, {})
  218. end
  219. self.equipBaseAttrItem = CommonUtil.BindGridViewItem2LuaStatic("EquipBaseAttrItem", tmp)
  220. self.equipBaseAttrItem.prefabName = "EquipBaseAttrItem"
  221. end
  222. ---@private
  223. function UIEquipListView:InitGenerate__12(Root, data)
  224. --[[
  225. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/ItemDsc
  226. --]]
  227. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/ItemDsc").gameObject
  228. if tolua.getpeer(tmp) == nil then
  229. tolua.setpeer(tmp, {})
  230. end
  231. self.itemDsc = tmp
  232. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  233. end
  234. ---@private
  235. function UIEquipListView:InitGenerate__13(Root, data)
  236. --[[
  237. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/Grid
  238. --]]
  239. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/TextsBox/Grid").gameObject
  240. if tolua.getpeer(tmp) == nil then
  241. tolua.setpeer(tmp, {})
  242. end
  243. self.topItem.grid = tmp
  244. end
  245. ---@private
  246. function UIEquipListView:InitGenerate__14(Root, data)
  247. --[[
  248. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/Equiped
  249. --]]
  250. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/Equiped").gameObject
  251. if tolua.getpeer(tmp) == nil then
  252. tolua.setpeer(tmp, {})
  253. end
  254. self.equiped = tmp
  255. end
  256. ---@private
  257. function UIEquipListView:InitGenerate__15(Root, data)
  258. --[[
  259. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/BtnChange
  260. --]]
  261. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/BtnChange").gameObject
  262. if tolua.getpeer(tmp) == nil then
  263. tolua.setpeer(tmp, {})
  264. end
  265. self.btnChange = tmp
  266. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  267. end
  268. ---@private
  269. function UIEquipListView:InitGenerate__16(Root, data)
  270. --[[
  271. UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/BtnDown
  272. --]]
  273. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipListEquippedItem/BtnDown").gameObject
  274. if tolua.getpeer(tmp) == nil then
  275. tolua.setpeer(tmp, {})
  276. end
  277. self.btnDown = tmp
  278. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  279. end
  280. ---@private
  281. function UIEquipListView:InitGenerate__17(Root, data)
  282. --[[
  283. UIAnimator/Window/Bg/TopItem/EquipBlank
  284. --]]
  285. local tmp = Root:Find("UIAnimator/Window/Bg/TopItem/EquipBlank").gameObject
  286. if tolua.getpeer(tmp) == nil then
  287. tolua.setpeer(tmp, {})
  288. end
  289. self.equipBlank = tmp
  290. end
  291. ---@private
  292. function UIEquipListView:InitGenerate__18(Root, data)
  293. --[[
  294. UIAnimator/Window/Bg/Scroll View
  295. --]]
  296. local tmp = Root:Find("UIAnimator/Window/Bg/Scroll View").gameObject
  297. if tolua.getpeer(tmp) == nil then
  298. tolua.setpeer(tmp, {})
  299. end
  300. self.scrollView = tmp
  301. tmp.loopVerticalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  302. end
  303. ---@private
  304. function UIEquipListView:InitGenerate__19(Root, data)
  305. --[[
  306. UIAnimator/Window/Bg/Scroll View/Viewport/EquipListItem
  307. --]]
  308. local tmp = Root:Find("UIAnimator/Window/Bg/Scroll View/Viewport/EquipListItem").gameObject
  309. if tolua.getpeer(tmp) == nil then
  310. tolua.setpeer(tmp, {})
  311. end
  312. self.equipListItem = CommonUtil.BindGridViewItem2LuaStatic("EquipListItem", tmp)
  313. self.equipListItem.prefabName = "EquipListItem"
  314. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  315. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  316. tmp.contentSizeFitter = tmp:GetComponent(Enum.TypeInfo.ContentSizeFitter)
  317. end
  318. ---@private
  319. function UIEquipListView:InitGenerate__20(Root, data)
  320. --[[
  321. UIAnimator/Window/Bg/Scroll View/Viewport/Content
  322. --]]
  323. local tmp = Root:Find("UIAnimator/Window/Bg/Scroll View/Viewport/Content").gameObject
  324. if tolua.getpeer(tmp) == nil then
  325. tolua.setpeer(tmp, {})
  326. end
  327. self.content = tmp
  328. tmp.verticalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.VerticalLayoutGroup)
  329. end
  330. ---@private
  331. function UIEquipListView:GenerateDestroy()
  332. if tolua.getpeer(self.topItem.grid) ~= nil then
  333. tolua.setpeer(self.topItem.grid, nil)
  334. end
  335. if tolua.getpeer(self.topItem.textName) ~= nil then
  336. tolua.setpeer(self.topItem.textName, nil)
  337. end
  338. if tolua.getpeer(self.uIAnimator) ~= nil then
  339. tolua.setpeer(self.uIAnimator, nil)
  340. end
  341. self.uIAnimator = nil
  342. if tolua.getpeer(self.AnyBtn) ~= nil then
  343. tolua.setpeer(self.AnyBtn, nil)
  344. end
  345. self.AnyBtn = nil
  346. if tolua.getpeer(self.window) ~= nil then
  347. tolua.setpeer(self.window, nil)
  348. end
  349. self.window = nil
  350. if tolua.getpeer(self.btnClose) ~= nil then
  351. tolua.setpeer(self.btnClose, nil)
  352. end
  353. self.btnClose = nil
  354. if tolua.getpeer(self.topItem) ~= nil then
  355. tolua.setpeer(self.topItem, nil)
  356. end
  357. self.topItem = nil
  358. if tolua.getpeer(self.equipListEquippedItem) ~= nil then
  359. tolua.setpeer(self.equipListEquippedItem, nil)
  360. end
  361. self.equipListEquippedItem = nil
  362. if tolua.getpeer(self.contentItem) ~= nil then
  363. tolua.setpeer(self.contentItem, nil)
  364. end
  365. self.contentItem = nil
  366. if self.iconItem.GenerateDestroy ~= nil then
  367. self.iconItem:GenerateDestroy()
  368. end
  369. if tolua.getpeer(self.iconItem) ~= nil then
  370. tolua.setpeer(self.iconItem, nil)
  371. end
  372. self.iconItem = nil
  373. if self.equipBaseAttrItem.GenerateDestroy ~= nil then
  374. self.equipBaseAttrItem:GenerateDestroy()
  375. end
  376. if tolua.getpeer(self.equipBaseAttrItem) ~= nil then
  377. tolua.setpeer(self.equipBaseAttrItem, nil)
  378. end
  379. self.equipBaseAttrItem = nil
  380. if tolua.getpeer(self.itemDsc) ~= nil then
  381. tolua.setpeer(self.itemDsc, nil)
  382. end
  383. self.itemDsc = nil
  384. if tolua.getpeer(self.equiped) ~= nil then
  385. tolua.setpeer(self.equiped, nil)
  386. end
  387. self.equiped = nil
  388. if tolua.getpeer(self.btnChange) ~= nil then
  389. tolua.setpeer(self.btnChange, nil)
  390. end
  391. self.btnChange = nil
  392. if tolua.getpeer(self.btnDown) ~= nil then
  393. tolua.setpeer(self.btnDown, nil)
  394. end
  395. self.btnDown = nil
  396. if tolua.getpeer(self.equipBlank) ~= nil then
  397. tolua.setpeer(self.equipBlank, nil)
  398. end
  399. self.equipBlank = nil
  400. if tolua.getpeer(self.scrollView) ~= nil then
  401. tolua.setpeer(self.scrollView, nil)
  402. end
  403. self.scrollView = nil
  404. if self.equipListItem.GenerateDestroy ~= nil then
  405. self.equipListItem:GenerateDestroy()
  406. end
  407. if tolua.getpeer(self.equipListItem) ~= nil then
  408. tolua.setpeer(self.equipListItem, nil)
  409. end
  410. self.equipListItem = nil
  411. if tolua.getpeer(self.content) ~= nil then
  412. tolua.setpeer(self.content, nil)
  413. end
  414. self.content = nil
  415. self.transform = nil
  416. self.gameObject = nil
  417. self.inited = false
  418. end
  419. return UIEquipListView