UIOptionalGiftView_Generate.lua 6.9 KB

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