UIMailBoxView_Generate.lua 7.2 KB

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