UIPetExchangeMatsView_Generate.lua 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. ---@class UIPetExchangeMats__Generate_btnSure
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UIPetExchangeMats__Generate_btnCancel
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIPetExchangeMats__Generate_number
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class UIPetExchangeMats__Generate_iconPetItem
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public rectTransform UnityEngine.RectTransform
  13. ---@field public layoutElement UnityEngine.UI.LayoutElement
  14. ---@class UIPetExchangeMats__Generate_mats
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public loopGridView SuperScrollView.LoopGridView
  17. ---@class UIPetExchangeMats__Generate_tips
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public text UnityEngine.UI.Text
  20. ---@class UIPetExchangeMats__Generate_textTitle
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public uILocalizeScript UILocalizeScript
  23. ---@class UIPetExchangeMats__Generate_bg
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public verticalLayoutGroup UnityEngine.UI.VerticalLayoutGroup
  26. ---@class UIPetExchangeMats__Generate_AnyBtn
  27. ---@field public gameObject UnityEngine.GameObject
  28. ---@field public button UnityEngine.UI.Button
  29. ---@class UIPetExchangeMats__Generate_uIAnimator
  30. ---@field public gameObject UnityEngine.GameObject
  31. ---@field public animator UnityEngine.Animator
  32. ---@class UIPetExchangeMats__Generate
  33. ---@field private gameObject UnityEngine.GameObject
  34. ---@field private transform UnityEngine.Transform
  35. ---@field private uIAnimator UIPetExchangeMats__Generate_uIAnimator
  36. ---@field private AnyBtn UIPetExchangeMats__Generate_AnyBtn
  37. ---@field private window UnityEngine.GameObject
  38. ---@field private bg UIPetExchangeMats__Generate_bg
  39. ---@field private textTitle UIPetExchangeMats__Generate_textTitle
  40. ---@field private tips UIPetExchangeMats__Generate_tips
  41. ---@field private mats UIPetExchangeMats__Generate_mats
  42. ---@field private cardIconItem UnityEngine.GameObject
  43. ---@field private iconPetItem UIPetExchangeMats__Generate_iconPetItem
  44. ---@field private noPets UnityEngine.GameObject
  45. ---@field private number UIPetExchangeMats__Generate_number
  46. ---@field private btnBox UnityEngine.GameObject
  47. ---@field private btnCancel UIPetExchangeMats__Generate_btnCancel
  48. ---@field private btnSure UIPetExchangeMats__Generate_btnSure
  49. local UIPetExchangeMatsView = class("UIPetExchangeMatsView", require("UIViewBase"))
  50. function UIPetExchangeMatsView:ctor()
  51. end
  52. ---@private
  53. function UIPetExchangeMatsView:SetActive(result)
  54. self.gameObject:SetActive(result)
  55. end
  56. ---@private
  57. function UIPetExchangeMatsView:InitGenerate(Root, data)
  58. self.transform = Root
  59. self.inited = true
  60. if self.super.Init then
  61. self.super.Init(self)
  62. end
  63. local tmp
  64. self:InitGenerate__1(Root,data)
  65. self:InitGenerate__2(Root,data)
  66. self:InitGenerate__3(Root,data)
  67. self:InitGenerate__4(Root,data)
  68. self:InitGenerate__5(Root,data)
  69. self:InitGenerate__6(Root,data)
  70. self:InitGenerate__7(Root,data)
  71. self:InitGenerate__8(Root,data)
  72. self:InitGenerate__9(Root,data)
  73. self:InitGenerate__10(Root,data)
  74. self:InitGenerate__11(Root,data)
  75. self:InitGenerate__12(Root,data)
  76. self:InitGenerate__13(Root,data)
  77. self:InitGenerate__14(Root,data)
  78. self:InitGenerate__15(Root,data)
  79. end
  80. ---@private
  81. function UIPetExchangeMatsView:InitGenerate__1(Root, data)
  82. --[[
  83. Root
  84. --]]
  85. end
  86. ---@private
  87. function UIPetExchangeMatsView:InitGenerate__2(Root, data)
  88. --[[
  89. UIAnimator
  90. --]]
  91. local tmp = Root:Find("UIAnimator").gameObject
  92. if tolua.getpeer(tmp) == nil then
  93. tolua.setpeer(tmp, {})
  94. end
  95. self.uIAnimator = tmp
  96. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  97. tmp.animator.logWarnings = false
  98. end
  99. ---@private
  100. function UIPetExchangeMatsView:InitGenerate__3(Root, data)
  101. --[[
  102. UIAnimator/Alpha
  103. --]]
  104. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.AnyBtn = tmp
  109. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  110. end
  111. ---@private
  112. function UIPetExchangeMatsView:InitGenerate__4(Root, data)
  113. --[[
  114. UIAnimator/Window
  115. --]]
  116. local tmp = Root:Find("UIAnimator/Window").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.window = tmp
  121. end
  122. ---@private
  123. function UIPetExchangeMatsView:InitGenerate__5(Root, data)
  124. --[[
  125. UIAnimator/Window/Bg
  126. --]]
  127. local tmp = Root:Find("UIAnimator/Window/Bg").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.bg = tmp
  132. tmp.verticalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.VerticalLayoutGroup)
  133. end
  134. ---@private
  135. function UIPetExchangeMatsView:InitGenerate__6(Root, data)
  136. --[[
  137. UIAnimator/Window/Bg/TextTitle
  138. --]]
  139. local tmp = Root:Find("UIAnimator/Window/Bg/TextTitle").gameObject
  140. if tolua.getpeer(tmp) == nil then
  141. tolua.setpeer(tmp, {})
  142. end
  143. self.textTitle = tmp
  144. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  145. end
  146. ---@private
  147. function UIPetExchangeMatsView:InitGenerate__7(Root, data)
  148. --[[
  149. UIAnimator/Window/Bg/Tips
  150. --]]
  151. local tmp = Root:Find("UIAnimator/Window/Bg/Tips").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.tips = tmp
  156. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  157. end
  158. ---@private
  159. function UIPetExchangeMatsView:InitGenerate__8(Root, data)
  160. --[[
  161. UIAnimator/Window/Bg/List/Mats
  162. --]]
  163. local tmp = Root:Find("UIAnimator/Window/Bg/List/Mats").gameObject
  164. if tolua.getpeer(tmp) == nil then
  165. tolua.setpeer(tmp, {})
  166. end
  167. self.mats = tmp
  168. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  169. end
  170. ---@private
  171. function UIPetExchangeMatsView:InitGenerate__9(Root, data)
  172. --[[
  173. UIAnimator/Window/Bg/List/Mats/View/CardIconItem
  174. --]]
  175. local tmp = Root:Find("UIAnimator/Window/Bg/List/Mats/View/CardIconItem").gameObject
  176. if tolua.getpeer(tmp) == nil then
  177. tolua.setpeer(tmp, {})
  178. end
  179. self.cardIconItem = CommonUtil.BindGridViewItem2LuaStatic("CardIconItem", tmp)
  180. self.cardIconItem.prefabName = "CardIconItem"
  181. end
  182. ---@private
  183. function UIPetExchangeMatsView:InitGenerate__10(Root, data)
  184. --[[
  185. UIAnimator/Window/Bg/List/Mats/View/IconPetItem
  186. --]]
  187. local tmp = Root:Find("UIAnimator/Window/Bg/List/Mats/View/IconPetItem").gameObject
  188. if tolua.getpeer(tmp) == nil then
  189. tolua.setpeer(tmp, {})
  190. end
  191. self.iconPetItem = CommonUtil.BindGridViewItem2LuaStatic("IconPetItem", tmp)
  192. self.iconPetItem.prefabName = "IconPetItem"
  193. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  194. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  195. end
  196. ---@private
  197. function UIPetExchangeMatsView:InitGenerate__11(Root, data)
  198. --[[
  199. UIAnimator/Window/Bg/List/NoPets
  200. --]]
  201. local tmp = Root:Find("UIAnimator/Window/Bg/List/NoPets").gameObject
  202. if tolua.getpeer(tmp) == nil then
  203. tolua.setpeer(tmp, {})
  204. end
  205. self.noPets = tmp
  206. end
  207. ---@private
  208. function UIPetExchangeMatsView:InitGenerate__12(Root, data)
  209. --[[
  210. UIAnimator/Window/Bg/Number/Number
  211. --]]
  212. local tmp = Root:Find("UIAnimator/Window/Bg/Number/Number").gameObject
  213. if tolua.getpeer(tmp) == nil then
  214. tolua.setpeer(tmp, {})
  215. end
  216. self.number = tmp
  217. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  218. end
  219. ---@private
  220. function UIPetExchangeMatsView:InitGenerate__13(Root, data)
  221. --[[
  222. UIAnimator/Window/Bg/BtnBox
  223. --]]
  224. local tmp = Root:Find("UIAnimator/Window/Bg/BtnBox").gameObject
  225. if tolua.getpeer(tmp) == nil then
  226. tolua.setpeer(tmp, {})
  227. end
  228. self.btnBox = tmp
  229. end
  230. ---@private
  231. function UIPetExchangeMatsView:InitGenerate__14(Root, data)
  232. --[[
  233. UIAnimator/Window/Bg/BtnBox/BtnCancel
  234. --]]
  235. local tmp = Root:Find("UIAnimator/Window/Bg/BtnBox/BtnCancel").gameObject
  236. if tolua.getpeer(tmp) == nil then
  237. tolua.setpeer(tmp, {})
  238. end
  239. self.btnCancel = tmp
  240. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  241. end
  242. ---@private
  243. function UIPetExchangeMatsView:InitGenerate__15(Root, data)
  244. --[[
  245. UIAnimator/Window/Bg/BtnBox/BtnSure
  246. --]]
  247. local tmp = Root:Find("UIAnimator/Window/Bg/BtnBox/BtnSure").gameObject
  248. if tolua.getpeer(tmp) == nil then
  249. tolua.setpeer(tmp, {})
  250. end
  251. self.btnSure = tmp
  252. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  253. end
  254. ---@private
  255. function UIPetExchangeMatsView:GenerateDestroy()
  256. if tolua.getpeer(self.uIAnimator) ~= nil then
  257. tolua.setpeer(self.uIAnimator, nil)
  258. end
  259. self.uIAnimator = nil
  260. if tolua.getpeer(self.AnyBtn) ~= nil then
  261. tolua.setpeer(self.AnyBtn, nil)
  262. end
  263. self.AnyBtn = nil
  264. if tolua.getpeer(self.window) ~= nil then
  265. tolua.setpeer(self.window, nil)
  266. end
  267. self.window = nil
  268. if tolua.getpeer(self.bg) ~= nil then
  269. tolua.setpeer(self.bg, nil)
  270. end
  271. self.bg = nil
  272. if tolua.getpeer(self.textTitle) ~= nil then
  273. tolua.setpeer(self.textTitle, nil)
  274. end
  275. self.textTitle = nil
  276. if tolua.getpeer(self.tips) ~= nil then
  277. tolua.setpeer(self.tips, nil)
  278. end
  279. self.tips = nil
  280. if tolua.getpeer(self.mats) ~= nil then
  281. tolua.setpeer(self.mats, nil)
  282. end
  283. self.mats = nil
  284. if self.cardIconItem.GenerateDestroy ~= nil then
  285. self.cardIconItem:GenerateDestroy()
  286. end
  287. if tolua.getpeer(self.cardIconItem) ~= nil then
  288. tolua.setpeer(self.cardIconItem, nil)
  289. end
  290. self.cardIconItem = nil
  291. if self.iconPetItem.GenerateDestroy ~= nil then
  292. self.iconPetItem:GenerateDestroy()
  293. end
  294. if tolua.getpeer(self.iconPetItem) ~= nil then
  295. tolua.setpeer(self.iconPetItem, nil)
  296. end
  297. self.iconPetItem = nil
  298. if tolua.getpeer(self.noPets) ~= nil then
  299. tolua.setpeer(self.noPets, nil)
  300. end
  301. self.noPets = nil
  302. if tolua.getpeer(self.number) ~= nil then
  303. tolua.setpeer(self.number, nil)
  304. end
  305. self.number = nil
  306. if tolua.getpeer(self.btnBox) ~= nil then
  307. tolua.setpeer(self.btnBox, nil)
  308. end
  309. self.btnBox = nil
  310. if tolua.getpeer(self.btnCancel) ~= nil then
  311. tolua.setpeer(self.btnCancel, nil)
  312. end
  313. self.btnCancel = nil
  314. if tolua.getpeer(self.btnSure) ~= nil then
  315. tolua.setpeer(self.btnSure, nil)
  316. end
  317. self.btnSure = nil
  318. self.transform = nil
  319. self.gameObject = nil
  320. self.inited = false
  321. end
  322. return UIPetExchangeMatsView