UIPetMatsView_Generate.lua 8.2 KB

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