UIOptionalWishBoxView_Generate.lua 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. ---@class UIOptionalWishBox__Generate_btnOK
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UIOptionalWishBox__Generate_wishBoxListItem
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIOptionalWishBox__Generate_scrollView
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public scrollRect UnityEngine.UI.ScrollRect
  10. ---@field public loopGridView SuperScrollView.LoopGridView
  11. ---@class UIOptionalWishBox__Generate_btnClose
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public button UnityEngine.UI.Button
  14. ---@class UIOptionalWishBox__Generate_AnyBtn
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public button UnityEngine.UI.Button
  17. ---@class UIOptionalWishBox__Generate_uIAnimator
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public animator UnityEngine.Animator
  20. ---@class UIOptionalWishBox__Generate
  21. ---@field private gameObject UnityEngine.GameObject
  22. ---@field private transform UnityEngine.Transform
  23. ---@field private uIEventHandler UIEventHandler
  24. ---@field private uIAnimator UIOptionalWishBox__Generate_uIAnimator
  25. ---@field private AnyBtn UIOptionalWishBox__Generate_AnyBtn
  26. ---@field private window UnityEngine.GameObject
  27. ---@field private btnClose UIOptionalWishBox__Generate_btnClose
  28. ---@field private scrollView UIOptionalWishBox__Generate_scrollView
  29. ---@field private wishBoxListItem UIOptionalWishBox__Generate_wishBoxListItem
  30. ---@field private btnOK UIOptionalWishBox__Generate_btnOK
  31. ---@field private title UnityEngine.GameObject
  32. local UIOptionalWishBoxView = class("UIOptionalWishBoxView", require("UIViewBase"))
  33. function UIOptionalWishBoxView:ctor()
  34. end
  35. ---@private
  36. function UIOptionalWishBoxView:SetActive(result)
  37. self.gameObject:SetActive(result)
  38. end
  39. ---@private
  40. function UIOptionalWishBoxView:InitGenerate(Root, data)
  41. self.transform = Root
  42. self.inited = true
  43. if self.super.Init then
  44. self.super.Init(self)
  45. end
  46. local tmp
  47. self:InitGenerate__1(Root,data)
  48. self:InitGenerate__2(Root,data)
  49. self:InitGenerate__3(Root,data)
  50. self:InitGenerate__4(Root,data)
  51. self:InitGenerate__5(Root,data)
  52. self:InitGenerate__6(Root,data)
  53. self:InitGenerate__7(Root,data)
  54. self:InitGenerate__8(Root,data)
  55. self:InitGenerate__9(Root,data)
  56. end
  57. ---@private
  58. function UIOptionalWishBoxView:InitGenerate__1(Root, data)
  59. --[[
  60. Root
  61. --]]
  62. self.uIEventHandler = Root:GetComponent(Enum.TypeInfo.UIEventHandler)
  63. end
  64. ---@private
  65. function UIOptionalWishBoxView:InitGenerate__2(Root, data)
  66. --[[
  67. UIAnimator
  68. --]]
  69. local tmp = Root:Find("UIAnimator").gameObject
  70. if tolua.getpeer(tmp) == nil then
  71. tolua.setpeer(tmp, {})
  72. end
  73. self.uIAnimator = tmp
  74. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  75. tmp.animator.logWarnings = false
  76. end
  77. ---@private
  78. function UIOptionalWishBoxView:InitGenerate__3(Root, data)
  79. --[[
  80. UIAnimator/Alpha
  81. --]]
  82. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  83. if tolua.getpeer(tmp) == nil then
  84. tolua.setpeer(tmp, {})
  85. end
  86. self.AnyBtn = tmp
  87. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  88. end
  89. ---@private
  90. function UIOptionalWishBoxView:InitGenerate__4(Root, data)
  91. --[[
  92. UIAnimator/Window
  93. --]]
  94. local tmp = Root:Find("UIAnimator/Window").gameObject
  95. if tolua.getpeer(tmp) == nil then
  96. tolua.setpeer(tmp, {})
  97. end
  98. self.window = tmp
  99. end
  100. ---@private
  101. function UIOptionalWishBoxView:InitGenerate__5(Root, data)
  102. --[[
  103. UIAnimator/Window/Bg/BtnClose
  104. --]]
  105. local tmp = Root:Find("UIAnimator/Window/Bg/BtnClose").gameObject
  106. if tolua.getpeer(tmp) == nil then
  107. tolua.setpeer(tmp, {})
  108. end
  109. self.btnClose = tmp
  110. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  111. end
  112. ---@private
  113. function UIOptionalWishBoxView:InitGenerate__6(Root, data)
  114. --[[
  115. UIAnimator/Window/Bg/ScrollView
  116. --]]
  117. local tmp = Root:Find("UIAnimator/Window/Bg/ScrollView").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.scrollView = tmp
  122. tmp.scrollRect = tmp:GetComponent(Enum.TypeInfo.ScrollRect)
  123. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  124. end
  125. ---@private
  126. function UIOptionalWishBoxView:InitGenerate__7(Root, data)
  127. --[[
  128. UIAnimator/Window/Bg/ScrollView/Viewport/Content/WishBoxListItem
  129. --]]
  130. local tmp = Root:Find("UIAnimator/Window/Bg/ScrollView/Viewport/Content/WishBoxListItem").gameObject
  131. if tolua.getpeer(tmp) == nil then
  132. tolua.setpeer(tmp, {})
  133. end
  134. self.wishBoxListItem = CommonUtil.BindGridViewItem2LuaStatic("WishBoxListItem", tmp)
  135. self.wishBoxListItem.prefabName = "WishBoxListItem"
  136. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  137. end
  138. ---@private
  139. function UIOptionalWishBoxView:InitGenerate__8(Root, data)
  140. --[[
  141. UIAnimator/Window/Bg/BtnBox/BtnOK
  142. --]]
  143. local tmp = Root:Find("UIAnimator/Window/Bg/BtnBox/BtnOK").gameObject
  144. if tolua.getpeer(tmp) == nil then
  145. tolua.setpeer(tmp, {})
  146. end
  147. self.btnOK = tmp
  148. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  149. end
  150. ---@private
  151. function UIOptionalWishBoxView:InitGenerate__9(Root, data)
  152. --[[
  153. UIAnimator/Window/Bg/BtnBox/Title
  154. --]]
  155. local tmp = Root:Find("UIAnimator/Window/Bg/BtnBox/Title").gameObject
  156. if tolua.getpeer(tmp) == nil then
  157. tolua.setpeer(tmp, {})
  158. end
  159. self.title = tmp
  160. end
  161. ---@private
  162. function UIOptionalWishBoxView:GenerateDestroy()
  163. if tolua.getpeer(self.uIAnimator) ~= nil then
  164. tolua.setpeer(self.uIAnimator, nil)
  165. end
  166. self.uIAnimator = nil
  167. if tolua.getpeer(self.AnyBtn) ~= nil then
  168. tolua.setpeer(self.AnyBtn, nil)
  169. end
  170. self.AnyBtn = nil
  171. if tolua.getpeer(self.window) ~= nil then
  172. tolua.setpeer(self.window, nil)
  173. end
  174. self.window = nil
  175. if tolua.getpeer(self.btnClose) ~= nil then
  176. tolua.setpeer(self.btnClose, nil)
  177. end
  178. self.btnClose = nil
  179. if tolua.getpeer(self.scrollView) ~= nil then
  180. tolua.setpeer(self.scrollView, nil)
  181. end
  182. self.scrollView = nil
  183. if self.wishBoxListItem.GenerateDestroy ~= nil then
  184. self.wishBoxListItem:GenerateDestroy()
  185. end
  186. if tolua.getpeer(self.wishBoxListItem) ~= nil then
  187. tolua.setpeer(self.wishBoxListItem, nil)
  188. end
  189. self.wishBoxListItem = nil
  190. if tolua.getpeer(self.btnOK) ~= nil then
  191. tolua.setpeer(self.btnOK, nil)
  192. end
  193. self.btnOK = nil
  194. if tolua.getpeer(self.title) ~= nil then
  195. tolua.setpeer(self.title, nil)
  196. end
  197. self.title = nil
  198. self.transform = nil
  199. self.gameObject = nil
  200. self.inited = false
  201. end
  202. return UIOptionalWishBoxView