UIMailView_Generate.lua 9.6 KB

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