TaskItemActivity_Generate.lua 6.9 KB

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