UISeasonRewardItem_Generate.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. ---@class UISeasonRewardItem__Generate_progress
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UISeasonRewardItem__Generate_rewardName
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text TMPro.TextMeshProUGUI
  7. ---@class UISeasonRewardItem__Generate_icon
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class UISeasonRewardItem__Generate_shadow
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class UISeasonRewardItem__Generate_flag
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@class UISeasonRewardItem__Generate_circle
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public image UnityEngine.UI.Image
  19. ---@class UISeasonRewardItem__Generate_content
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public gridLayoutGroup UnityEngine.UI.GridLayoutGroup
  22. ---@class UISeasonRewardItem__Generate_scrollView
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public loopHorizontalScrollRect UnityEngine.UI.LoopHorizontalScrollRect
  25. ---@field public loopScrollRectDragEventInherit LoopScrollRectDragEventInherit
  26. ---@class UISeasonRewardItem__Generate
  27. ---@field private gameObject UnityEngine.GameObject
  28. ---@field private transform UnityEngine.Transform
  29. ---@field private scrollView UISeasonRewardItem__Generate_scrollView
  30. ---@field private content UISeasonRewardItem__Generate_content
  31. ---@field private cornerMark UnityEngine.GameObject
  32. ---@field private rewarded UnityEngine.GameObject
  33. ---@field private label UnityEngine.GameObject
  34. ---@field private circle UISeasonRewardItem__Generate_circle
  35. ---@field private flag UISeasonRewardItem__Generate_flag
  36. ---@field private shadow UISeasonRewardItem__Generate_shadow
  37. ---@field private icon UISeasonRewardItem__Generate_icon
  38. ---@field private rewardName UISeasonRewardItem__Generate_rewardName
  39. ---@field private progress UISeasonRewardItem__Generate_progress
  40. local UISeasonRewardItemView = class("UISeasonRewardItemView")
  41. function UISeasonRewardItemView:ctor()
  42. end
  43. ---@private
  44. function UISeasonRewardItemView:SetActive(result)
  45. self.gameObject:SetActive(result)
  46. end
  47. ---@private
  48. function UISeasonRewardItemView:InitGenerate(Root, data)
  49. self.transform = Root
  50. self.inited = true
  51. local tmp
  52. self:InitGenerate__1(Root,data)
  53. self:InitGenerate__2(Root,data)
  54. self:InitGenerate__3(Root,data)
  55. self:InitGenerate__4(Root,data)
  56. self:InitGenerate__5(Root,data)
  57. self:InitGenerate__6(Root,data)
  58. self:InitGenerate__7(Root,data)
  59. self:InitGenerate__8(Root,data)
  60. self:InitGenerate__9(Root,data)
  61. self:InitGenerate__10(Root,data)
  62. self:InitGenerate__11(Root,data)
  63. self:InitGenerate__12(Root,data)
  64. end
  65. ---@private
  66. function UISeasonRewardItemView:InitGenerate__1(Root, data)
  67. --[[
  68. Root
  69. --]]
  70. end
  71. ---@private
  72. function UISeasonRewardItemView:InitGenerate__2(Root, data)
  73. --[[
  74. Scroll View
  75. --]]
  76. local tmp = Root:Find("Scroll View").gameObject
  77. if tolua.getpeer(tmp) == nil then
  78. tolua.setpeer(tmp, {})
  79. end
  80. self.scrollView = tmp
  81. tmp.loopHorizontalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopHorizontalScrollRect)
  82. tmp.loopScrollRectDragEventInherit = tmp:GetComponent(Enum.TypeInfo.LoopScrollRectDragEventInherit)
  83. end
  84. ---@private
  85. function UISeasonRewardItemView:InitGenerate__3(Root, data)
  86. --[[
  87. Scroll View/Viewport/Content
  88. --]]
  89. local tmp = Root:Find("Scroll View/Viewport/Content").gameObject
  90. if tolua.getpeer(tmp) == nil then
  91. tolua.setpeer(tmp, {})
  92. end
  93. self.content = tmp
  94. tmp.gridLayoutGroup = tmp:GetComponent(Enum.TypeInfo.GridLayoutGroup)
  95. end
  96. ---@private
  97. function UISeasonRewardItemView:InitGenerate__4(Root, data)
  98. --[[
  99. CornerMark
  100. --]]
  101. local tmp = Root:Find("CornerMark").gameObject
  102. if tolua.getpeer(tmp) == nil then
  103. tolua.setpeer(tmp, {})
  104. end
  105. self.cornerMark = tmp
  106. self.cornerMark:SetActive(false)
  107. end
  108. ---@private
  109. function UISeasonRewardItemView:InitGenerate__5(Root, data)
  110. --[[
  111. Rewarded
  112. --]]
  113. local tmp = Root:Find("Rewarded").gameObject
  114. if tolua.getpeer(tmp) == nil then
  115. tolua.setpeer(tmp, {})
  116. end
  117. self.rewarded = tmp
  118. self.rewarded:SetActive(false)
  119. end
  120. ---@private
  121. function UISeasonRewardItemView:InitGenerate__6(Root, data)
  122. --[[
  123. Rewarded/Label
  124. --]]
  125. local tmp = Root:Find("Rewarded/Label").gameObject
  126. if tolua.getpeer(tmp) == nil then
  127. tolua.setpeer(tmp, {})
  128. end
  129. self.label = tmp
  130. end
  131. ---@private
  132. function UISeasonRewardItemView:InitGenerate__7(Root, data)
  133. --[[
  134. circle
  135. --]]
  136. local tmp = Root:Find("circle").gameObject
  137. if tolua.getpeer(tmp) == nil then
  138. tolua.setpeer(tmp, {})
  139. end
  140. self.circle = tmp
  141. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  142. end
  143. ---@private
  144. function UISeasonRewardItemView:InitGenerate__8(Root, data)
  145. --[[
  146. Flag
  147. --]]
  148. local tmp = Root:Find("Flag").gameObject
  149. if tolua.getpeer(tmp) == nil then
  150. tolua.setpeer(tmp, {})
  151. end
  152. self.flag = tmp
  153. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  154. end
  155. ---@private
  156. function UISeasonRewardItemView:InitGenerate__9(Root, data)
  157. --[[
  158. shadow
  159. --]]
  160. local tmp = Root:Find("shadow").gameObject
  161. if tolua.getpeer(tmp) == nil then
  162. tolua.setpeer(tmp, {})
  163. end
  164. self.shadow = tmp
  165. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  166. end
  167. ---@private
  168. function UISeasonRewardItemView:InitGenerate__10(Root, data)
  169. --[[
  170. icon
  171. --]]
  172. local tmp = Root:Find("icon").gameObject
  173. if tolua.getpeer(tmp) == nil then
  174. tolua.setpeer(tmp, {})
  175. end
  176. self.icon = tmp
  177. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  178. end
  179. ---@private
  180. function UISeasonRewardItemView:InitGenerate__11(Root, data)
  181. --[[
  182. RewardName
  183. --]]
  184. local tmp = Root:Find("RewardName").gameObject
  185. if tolua.getpeer(tmp) == nil then
  186. tolua.setpeer(tmp, {})
  187. end
  188. self.rewardName = tmp
  189. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  190. end
  191. ---@private
  192. function UISeasonRewardItemView:InitGenerate__12(Root, data)
  193. --[[
  194. Progress
  195. --]]
  196. local tmp = Root:Find("Progress").gameObject
  197. if tolua.getpeer(tmp) == nil then
  198. tolua.setpeer(tmp, {})
  199. end
  200. self.progress = tmp
  201. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  202. end
  203. ---@private
  204. function UISeasonRewardItemView:GenerateDestroy()
  205. if tolua.getpeer(self.scrollView) ~= nil then
  206. tolua.setpeer(self.scrollView, nil)
  207. end
  208. self.scrollView = nil
  209. if tolua.getpeer(self.content) ~= nil then
  210. tolua.setpeer(self.content, nil)
  211. end
  212. self.content = nil
  213. if tolua.getpeer(self.cornerMark) ~= nil then
  214. tolua.setpeer(self.cornerMark, nil)
  215. end
  216. self.cornerMark = nil
  217. if tolua.getpeer(self.rewarded) ~= nil then
  218. tolua.setpeer(self.rewarded, nil)
  219. end
  220. self.rewarded = nil
  221. if tolua.getpeer(self.label) ~= nil then
  222. tolua.setpeer(self.label, nil)
  223. end
  224. self.label = nil
  225. if tolua.getpeer(self.circle) ~= nil then
  226. tolua.setpeer(self.circle, nil)
  227. end
  228. self.circle = nil
  229. if tolua.getpeer(self.flag) ~= nil then
  230. tolua.setpeer(self.flag, nil)
  231. end
  232. self.flag = nil
  233. if tolua.getpeer(self.shadow) ~= nil then
  234. tolua.setpeer(self.shadow, nil)
  235. end
  236. self.shadow = nil
  237. if tolua.getpeer(self.icon) ~= nil then
  238. tolua.setpeer(self.icon, nil)
  239. end
  240. self.icon = nil
  241. if tolua.getpeer(self.rewardName) ~= nil then
  242. tolua.setpeer(self.rewardName, nil)
  243. end
  244. self.rewardName = nil
  245. if tolua.getpeer(self.progress) ~= nil then
  246. tolua.setpeer(self.progress, nil)
  247. end
  248. self.progress = nil
  249. self.transform = nil
  250. self.gameObject = nil
  251. self.inited = false
  252. end
  253. return UISeasonRewardItemView