RewardsBoxItem_Generate.lua 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. ---@class RewardsBoxItem__Generate_btnBuyMore_num
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class RewardsBoxItem__Generate_btnBuyMore
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@field public num RewardsBoxItem__Generate_btnBuyMore_num
  8. ---@class RewardsBoxItem__Generate_btnPlayRule
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public button UnityEngine.UI.Button
  11. ---@class RewardsBoxItem__Generate_btnGotoDown_iconSmallItem
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public rectTransform UnityEngine.RectTransform
  14. ---@field public layoutElement UnityEngine.UI.LayoutElement
  15. ---@class RewardsBoxItem__Generate_btnGotoDown
  16. ---@field public gameObject UnityEngine.GameObject
  17. ---@field public button UnityEngine.UI.Button
  18. ---@field public iconSmallItem RewardsBoxItem__Generate_btnGotoDown_iconSmallItem
  19. ---@class RewardsBoxItem__Generate_btnGotoUp_iconSmallItem
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public rectTransform UnityEngine.RectTransform
  22. ---@field public layoutElement UnityEngine.UI.LayoutElement
  23. ---@class RewardsBoxItem__Generate_btnGotoUp
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public button UnityEngine.UI.Button
  26. ---@field public iconSmallItem RewardsBoxItem__Generate_btnGotoUp_iconSmallItem
  27. ---@class RewardsBoxItem__Generate_timeBox_textTime
  28. ---@field public gameObject UnityEngine.GameObject
  29. ---@field public text UnityEngine.UI.Text
  30. ---@class RewardsBoxItem__Generate_timeBox
  31. ---@field public gameObject UnityEngine.GameObject
  32. ---@field public textTime RewardsBoxItem__Generate_timeBox_textTime
  33. ---@class RewardsBoxItem__Generate_scrollView
  34. ---@field public gameObject UnityEngine.GameObject
  35. ---@field public loopGridView SuperScrollView.LoopGridView
  36. ---@field public content UnityEngine.GameObject
  37. ---@class RewardsBoxItem__Generate
  38. ---@field private gameObject UnityEngine.GameObject
  39. ---@field private transform UnityEngine.Transform
  40. ---@field private rectTransform UnityEngine.RectTransform
  41. ---@field private scrollView RewardsBoxItem__Generate_scrollView
  42. ---@field private timeBox RewardsBoxItem__Generate_timeBox
  43. ---@field private btnGotoUp RewardsBoxItem__Generate_btnGotoUp
  44. ---@field private btnGotoDown RewardsBoxItem__Generate_btnGotoDown
  45. ---@field private btnPlayRule RewardsBoxItem__Generate_btnPlayRule
  46. ---@field private btnBuyMore RewardsBoxItem__Generate_btnBuyMore
  47. ---@field private expUpRed UnityEngine.GameObject
  48. ---@field private labelUnLocked UnityEngine.GameObject
  49. local RewardsBoxItemView = class("RewardsBoxItemView")
  50. function RewardsBoxItemView:ctor()
  51. end
  52. ---@private
  53. function RewardsBoxItemView:SetActive(result)
  54. self.gameObject:SetActive(result)
  55. end
  56. ---@private
  57. function RewardsBoxItemView:InitGenerate(Root, data)
  58. self.transform = Root
  59. self.inited = true
  60. local tmp
  61. self:InitGenerate__1(Root,data)
  62. self:InitGenerate__2(Root,data)
  63. self:InitGenerate__3(Root,data)
  64. self:InitGenerate__4(Root,data)
  65. self:InitGenerate__5(Root,data)
  66. self:InitGenerate__6(Root,data)
  67. self:InitGenerate__7(Root,data)
  68. self:InitGenerate__8(Root,data)
  69. self:InitGenerate__9(Root,data)
  70. self:InitGenerate__10(Root,data)
  71. self:InitGenerate__11(Root,data)
  72. self:InitGenerate__12(Root,data)
  73. self:InitGenerate__13(Root,data)
  74. self:InitGenerate__14(Root,data)
  75. end
  76. ---@private
  77. function RewardsBoxItemView:InitGenerate__1(Root, data)
  78. --[[
  79. Root
  80. --]]
  81. self.rectTransform = Root:GetComponent(Enum.TypeInfo.RectTransform)
  82. end
  83. ---@private
  84. function RewardsBoxItemView:InitGenerate__2(Root, data)
  85. --[[
  86. ScrollView
  87. --]]
  88. local tmp = Root:Find("ScrollView").gameObject
  89. if tolua.getpeer(tmp) == nil then
  90. tolua.setpeer(tmp, {})
  91. end
  92. self.scrollView = tmp
  93. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  94. end
  95. ---@private
  96. function RewardsBoxItemView:InitGenerate__3(Root, data)
  97. --[[
  98. ScrollView/Viewport/Content
  99. --]]
  100. local tmp = Root:Find("ScrollView/Viewport/Content").gameObject
  101. if tolua.getpeer(tmp) == nil then
  102. tolua.setpeer(tmp, {})
  103. end
  104. self.scrollView.content = tmp
  105. end
  106. ---@private
  107. function RewardsBoxItemView:InitGenerate__4(Root, data)
  108. --[[
  109. TimeBox
  110. --]]
  111. local tmp = Root:Find("TimeBox").gameObject
  112. if tolua.getpeer(tmp) == nil then
  113. tolua.setpeer(tmp, {})
  114. end
  115. self.timeBox = tmp
  116. end
  117. ---@private
  118. function RewardsBoxItemView:InitGenerate__5(Root, data)
  119. --[[
  120. TimeBox/TextTime
  121. --]]
  122. local tmp = Root:Find("TimeBox/TextTime").gameObject
  123. if tolua.getpeer(tmp) == nil then
  124. tolua.setpeer(tmp, {})
  125. end
  126. self.timeBox.textTime = tmp
  127. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  128. end
  129. ---@private
  130. function RewardsBoxItemView:InitGenerate__6(Root, data)
  131. --[[
  132. BtnGotoUp
  133. --]]
  134. local tmp = Root:Find("BtnGotoUp").gameObject
  135. if tolua.getpeer(tmp) == nil then
  136. tolua.setpeer(tmp, {})
  137. end
  138. self.btnGotoUp = tmp
  139. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  140. end
  141. ---@private
  142. function RewardsBoxItemView:InitGenerate__7(Root, data)
  143. --[[
  144. BtnGotoUp/BgAnim/IconSmallItem
  145. --]]
  146. local tmp = Root:Find("BtnGotoUp/BgAnim/IconSmallItem").gameObject
  147. if tolua.getpeer(tmp) == nil then
  148. tolua.setpeer(tmp, {})
  149. end
  150. self.btnGotoUp.iconSmallItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  151. self.btnGotoUp.iconSmallItem.prefabName = "IconItem"
  152. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  153. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  154. end
  155. ---@private
  156. function RewardsBoxItemView:InitGenerate__8(Root, data)
  157. --[[
  158. BtnGotoDown
  159. --]]
  160. local tmp = Root:Find("BtnGotoDown").gameObject
  161. if tolua.getpeer(tmp) == nil then
  162. tolua.setpeer(tmp, {})
  163. end
  164. self.btnGotoDown = tmp
  165. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  166. end
  167. ---@private
  168. function RewardsBoxItemView:InitGenerate__9(Root, data)
  169. --[[
  170. BtnGotoDown/BgAnim/IconSmallItem
  171. --]]
  172. local tmp = Root:Find("BtnGotoDown/BgAnim/IconSmallItem").gameObject
  173. if tolua.getpeer(tmp) == nil then
  174. tolua.setpeer(tmp, {})
  175. end
  176. self.btnGotoDown.iconSmallItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  177. self.btnGotoDown.iconSmallItem.prefabName = "IconItem"
  178. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  179. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  180. end
  181. ---@private
  182. function RewardsBoxItemView:InitGenerate__10(Root, data)
  183. --[[
  184. CloudBottm/CloudAnim/BtnPlayRule
  185. --]]
  186. local tmp = Root:Find("CloudBottm/CloudAnim/BtnPlayRule").gameObject
  187. if tolua.getpeer(tmp) == nil then
  188. tolua.setpeer(tmp, {})
  189. end
  190. self.btnPlayRule = tmp
  191. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  192. end
  193. ---@private
  194. function RewardsBoxItemView:InitGenerate__11(Root, data)
  195. --[[
  196. CloudBottm/CloudAnim/BtnBuyMore
  197. --]]
  198. local tmp = Root:Find("CloudBottm/CloudAnim/BtnBuyMore").gameObject
  199. if tolua.getpeer(tmp) == nil then
  200. tolua.setpeer(tmp, {})
  201. end
  202. self.btnBuyMore = tmp
  203. self.btnBuyMore:SetActive(false)
  204. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  205. end
  206. ---@private
  207. function RewardsBoxItemView:InitGenerate__12(Root, data)
  208. --[[
  209. CloudBottm/CloudAnim/BtnBuyMore/ExpUpRed
  210. --]]
  211. local tmp = Root:Find("CloudBottm/CloudAnim/BtnBuyMore/ExpUpRed").gameObject
  212. if tolua.getpeer(tmp) == nil then
  213. tolua.setpeer(tmp, {})
  214. end
  215. self.expUpRed = tmp
  216. end
  217. ---@private
  218. function RewardsBoxItemView:InitGenerate__13(Root, data)
  219. --[[
  220. CloudBottm/CloudAnim/BtnBuyMore/ExpUpRed/RedPoint/LvUp/num
  221. --]]
  222. local tmp = Root:Find("CloudBottm/CloudAnim/BtnBuyMore/ExpUpRed/RedPoint/LvUp/num").gameObject
  223. if tolua.getpeer(tmp) == nil then
  224. tolua.setpeer(tmp, {})
  225. end
  226. self.btnBuyMore.num = tmp
  227. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  228. end
  229. ---@private
  230. function RewardsBoxItemView:InitGenerate__14(Root, data)
  231. --[[
  232. CloudBottm/CloudAnim/LabelUnLocked
  233. --]]
  234. local tmp = Root:Find("CloudBottm/CloudAnim/LabelUnLocked").gameObject
  235. if tolua.getpeer(tmp) == nil then
  236. tolua.setpeer(tmp, {})
  237. end
  238. self.labelUnLocked = tmp
  239. self.labelUnLocked:SetActive(false)
  240. end
  241. ---@private
  242. function RewardsBoxItemView:GenerateDestroy()
  243. if tolua.getpeer(self.btnBuyMore.num) ~= nil then
  244. tolua.setpeer(self.btnBuyMore.num, nil)
  245. end
  246. if self.btnGotoDown.iconSmallItem.GenerateDestroy ~= nil then
  247. self.btnGotoDown.iconSmallItem:GenerateDestroy()
  248. end
  249. if tolua.getpeer(self.btnGotoDown.iconSmallItem) ~= nil then
  250. tolua.setpeer(self.btnGotoDown.iconSmallItem, nil)
  251. end
  252. if self.btnGotoUp.iconSmallItem.GenerateDestroy ~= nil then
  253. self.btnGotoUp.iconSmallItem:GenerateDestroy()
  254. end
  255. if tolua.getpeer(self.btnGotoUp.iconSmallItem) ~= nil then
  256. tolua.setpeer(self.btnGotoUp.iconSmallItem, nil)
  257. end
  258. if tolua.getpeer(self.timeBox.textTime) ~= nil then
  259. tolua.setpeer(self.timeBox.textTime, nil)
  260. end
  261. if tolua.getpeer(self.timeBox) ~= nil then
  262. tolua.setpeer(self.timeBox, nil)
  263. end
  264. if tolua.getpeer(self.scrollView.content) ~= nil then
  265. tolua.setpeer(self.scrollView.content, nil)
  266. end
  267. if tolua.getpeer(self.scrollView) ~= nil then
  268. tolua.setpeer(self.scrollView, nil)
  269. end
  270. if tolua.getpeer(self.btnGotoUp) ~= nil then
  271. tolua.setpeer(self.btnGotoUp, nil)
  272. end
  273. self.btnGotoUp = nil
  274. if tolua.getpeer(self.btnGotoDown) ~= nil then
  275. tolua.setpeer(self.btnGotoDown, nil)
  276. end
  277. self.btnGotoDown = nil
  278. if tolua.getpeer(self.btnPlayRule) ~= nil then
  279. tolua.setpeer(self.btnPlayRule, nil)
  280. end
  281. self.btnPlayRule = nil
  282. if tolua.getpeer(self.btnBuyMore) ~= nil then
  283. tolua.setpeer(self.btnBuyMore, nil)
  284. end
  285. self.btnBuyMore = nil
  286. if tolua.getpeer(self.expUpRed) ~= nil then
  287. tolua.setpeer(self.expUpRed, nil)
  288. end
  289. self.expUpRed = nil
  290. if tolua.getpeer(self.labelUnLocked) ~= nil then
  291. tolua.setpeer(self.labelUnLocked, nil)
  292. end
  293. self.labelUnLocked = nil
  294. self.transform = nil
  295. self.gameObject = nil
  296. self.inited = false
  297. end
  298. return RewardsBoxItemView