RewardInfoItem_Generate.lua 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. ---@class RewardInfoItem__Generate_getBtn
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@field public text UnityEngine.GameObject
  5. ---@class RewardInfoItem__Generate_gotoBtn
  6. ---@field public gameObject UnityEngine.GameObject
  7. ---@field public button UnityEngine.UI.Button
  8. ---@field public text UnityEngine.GameObject
  9. ---@class RewardInfoItem__Generate_content
  10. ---@field public gameObject UnityEngine.GameObject
  11. ---@field public horizontalLayoutGroup UnityEngine.UI.HorizontalLayoutGroup
  12. ---@class RewardInfoItem__Generate_goodsItems
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public loopHorizontalScrollRect UnityEngine.UI.LoopHorizontalScrollRect
  15. ---@class RewardInfoItem__Generate_doNumTxt
  16. ---@field public gameObject UnityEngine.GameObject
  17. ---@field public text UnityEngine.UI.Text
  18. ---@class RewardInfoItem__Generate_progress
  19. ---@field public gameObject UnityEngine.GameObject
  20. ---@field public scrollbar UnityEngine.UI.Scrollbar
  21. ---@class RewardInfoItem__Generate_taskName
  22. ---@field public gameObject UnityEngine.GameObject
  23. ---@field public text UnityEngine.UI.Text
  24. ---@class RewardInfoItem__Generate
  25. ---@field private gameObject UnityEngine.GameObject
  26. ---@field private transform UnityEngine.Transform
  27. ---@field private taskName RewardInfoItem__Generate_taskName
  28. ---@field private progress RewardInfoItem__Generate_progress
  29. ---@field private doNumTxt RewardInfoItem__Generate_doNumTxt
  30. ---@field private goodsItems RewardInfoItem__Generate_goodsItems
  31. ---@field private content RewardInfoItem__Generate_content
  32. ---@field private gotoBtn RewardInfoItem__Generate_gotoBtn
  33. ---@field private getBtn RewardInfoItem__Generate_getBtn
  34. ---@field private sealBtn UnityEngine.GameObject
  35. ---@field private endBtn UnityEngine.GameObject
  36. local RewardInfoItemView = class("RewardInfoItemView")
  37. function RewardInfoItemView:ctor()
  38. end
  39. ---@private
  40. function RewardInfoItemView:SetActive(result)
  41. self.gameObject:SetActive(result)
  42. end
  43. ---@private
  44. function RewardInfoItemView:InitGenerate(Root, data)
  45. self.transform = Root
  46. self.inited = true
  47. local tmp
  48. self:InitGenerate__1(Root,data)
  49. self:InitGenerate__2(Root,data)
  50. self:InitGenerate__3(Root,data)
  51. self:InitGenerate__4(Root,data)
  52. self:InitGenerate__5(Root,data)
  53. self:InitGenerate__6(Root,data)
  54. self:InitGenerate__7(Root,data)
  55. self:InitGenerate__8(Root,data)
  56. self:InitGenerate__9(Root,data)
  57. self:InitGenerate__10(Root,data)
  58. self:InitGenerate__11(Root,data)
  59. self:InitGenerate__12(Root,data)
  60. end
  61. ---@private
  62. function RewardInfoItemView:InitGenerate__1(Root, data)
  63. --[[
  64. Root
  65. --]]
  66. end
  67. ---@private
  68. function RewardInfoItemView:InitGenerate__2(Root, data)
  69. --[[
  70. TaskName
  71. --]]
  72. local tmp = Root:Find("TaskName").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.taskName = tmp
  77. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  78. end
  79. ---@private
  80. function RewardInfoItemView:InitGenerate__3(Root, data)
  81. --[[
  82. Scrollbar
  83. --]]
  84. local tmp = Root:Find("Scrollbar").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.progress = tmp
  89. tmp.scrollbar = tmp:GetComponent(Enum.TypeInfo.Scrollbar)
  90. end
  91. ---@private
  92. function RewardInfoItemView:InitGenerate__4(Root, data)
  93. --[[
  94. Ratio
  95. --]]
  96. local tmp = Root:Find("Ratio").gameObject
  97. if tolua.getpeer(tmp) == nil then
  98. tolua.setpeer(tmp, {})
  99. end
  100. self.doNumTxt = tmp
  101. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  102. end
  103. ---@private
  104. function RewardInfoItemView:InitGenerate__5(Root, data)
  105. --[[
  106. GoodsItems
  107. --]]
  108. local tmp = Root:Find("GoodsItems").gameObject
  109. if tolua.getpeer(tmp) == nil then
  110. tolua.setpeer(tmp, {})
  111. end
  112. self.goodsItems = tmp
  113. tmp.loopHorizontalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopHorizontalScrollRect)
  114. end
  115. ---@private
  116. function RewardInfoItemView:InitGenerate__6(Root, data)
  117. --[[
  118. GoodsItems/Viewport/Content
  119. --]]
  120. local tmp = Root:Find("GoodsItems/Viewport/Content").gameObject
  121. if tolua.getpeer(tmp) == nil then
  122. tolua.setpeer(tmp, {})
  123. end
  124. self.content = tmp
  125. tmp.horizontalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.HorizontalLayoutGroup)
  126. end
  127. ---@private
  128. function RewardInfoItemView:InitGenerate__7(Root, data)
  129. --[[
  130. BtnGoto
  131. --]]
  132. local tmp = Root:Find("BtnGoto").gameObject
  133. if tolua.getpeer(tmp) == nil then
  134. tolua.setpeer(tmp, {})
  135. end
  136. self.gotoBtn = tmp
  137. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  138. end
  139. ---@private
  140. function RewardInfoItemView:InitGenerate__8(Root, data)
  141. --[[
  142. BtnGoto/Text
  143. --]]
  144. local tmp = Root:Find("BtnGoto/Text").gameObject
  145. if tolua.getpeer(tmp) == nil then
  146. tolua.setpeer(tmp, {})
  147. end
  148. self.gotoBtn.text = tmp
  149. end
  150. ---@private
  151. function RewardInfoItemView:InitGenerate__9(Root, data)
  152. --[[
  153. BtnGet
  154. --]]
  155. local tmp = Root:Find("BtnGet").gameObject
  156. if tolua.getpeer(tmp) == nil then
  157. tolua.setpeer(tmp, {})
  158. end
  159. self.getBtn = tmp
  160. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  161. end
  162. ---@private
  163. function RewardInfoItemView:InitGenerate__10(Root, data)
  164. --[[
  165. BtnGet/Text
  166. --]]
  167. local tmp = Root:Find("BtnGet/Text").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.getBtn.text = tmp
  172. end
  173. ---@private
  174. function RewardInfoItemView:InitGenerate__11(Root, data)
  175. --[[
  176. Seal
  177. --]]
  178. local tmp = Root:Find("Seal").gameObject
  179. if tolua.getpeer(tmp) == nil then
  180. tolua.setpeer(tmp, {})
  181. end
  182. self.sealBtn = tmp
  183. end
  184. ---@private
  185. function RewardInfoItemView:InitGenerate__12(Root, data)
  186. --[[
  187. End
  188. --]]
  189. local tmp = Root:Find("End").gameObject
  190. if tolua.getpeer(tmp) == nil then
  191. tolua.setpeer(tmp, {})
  192. end
  193. self.endBtn = tmp
  194. end
  195. ---@private
  196. function RewardInfoItemView:GenerateDestroy()
  197. if tolua.getpeer(self.endBtn) ~= nil then
  198. tolua.setpeer(self.endBtn, nil)
  199. end
  200. if tolua.getpeer(self.sealBtn) ~= nil then
  201. tolua.setpeer(self.sealBtn, nil)
  202. end
  203. if tolua.getpeer(self.getBtn.text) ~= nil then
  204. tolua.setpeer(self.getBtn.text, nil)
  205. end
  206. if tolua.getpeer(self.getBtn) ~= nil then
  207. tolua.setpeer(self.getBtn, nil)
  208. end
  209. if tolua.getpeer(self.gotoBtn.text) ~= nil then
  210. tolua.setpeer(self.gotoBtn.text, nil)
  211. end
  212. if tolua.getpeer(self.gotoBtn) ~= nil then
  213. tolua.setpeer(self.gotoBtn, nil)
  214. end
  215. if tolua.getpeer(self.doNumTxt) ~= nil then
  216. tolua.setpeer(self.doNumTxt, nil)
  217. end
  218. if tolua.getpeer(self.progress) ~= nil then
  219. tolua.setpeer(self.progress, nil)
  220. end
  221. if tolua.getpeer(self.taskName) ~= nil then
  222. tolua.setpeer(self.taskName, nil)
  223. end
  224. if tolua.getpeer(self.goodsItems) ~= nil then
  225. tolua.setpeer(self.goodsItems, nil)
  226. end
  227. self.goodsItems = nil
  228. if tolua.getpeer(self.content) ~= nil then
  229. tolua.setpeer(self.content, nil)
  230. end
  231. self.content = nil
  232. self.transform = nil
  233. self.gameObject = nil
  234. self.inited = false
  235. end
  236. return RewardInfoItemView