RecruitTaskItem_Generate.lua 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. ---@class RecruitTaskItem__Generate_btnNotFinish
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@field public text UnityEngine.GameObject
  5. ---@class RecruitTaskItem__Generate_overText
  6. ---@field public gameObject UnityEngine.GameObject
  7. ---@field public text UnityEngine.UI.Text
  8. ---@class RecruitTaskItem__Generate_btnGet
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public button UnityEngine.UI.Button
  11. ---@field public text UnityEngine.GameObject
  12. ---@class RecruitTaskItem__Generate_count
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public text UnityEngine.UI.Text
  15. ---@class RecruitTaskItem__Generate_dsc
  16. ---@field public gameObject UnityEngine.GameObject
  17. ---@field public text UnityEngine.UI.Text
  18. ---@class RecruitTaskItem__Generate_taskName
  19. ---@field public gameObject UnityEngine.GameObject
  20. ---@field public text UnityEngine.UI.Text
  21. ---@class RecruitTaskItem__Generate_iconSmallItem
  22. ---@field public gameObject UnityEngine.GameObject
  23. ---@field public rectTransform UnityEngine.RectTransform
  24. ---@field public layoutElement UnityEngine.UI.LayoutElement
  25. ---@class RecruitTaskItem__Generate
  26. ---@field private gameObject UnityEngine.GameObject
  27. ---@field private transform UnityEngine.Transform
  28. ---@field private iconSmallItem RecruitTaskItem__Generate_iconSmallItem
  29. ---@field private taskName RecruitTaskItem__Generate_taskName
  30. ---@field private dsc RecruitTaskItem__Generate_dsc
  31. ---@field private count RecruitTaskItem__Generate_count
  32. ---@field private btnGet RecruitTaskItem__Generate_btnGet
  33. ---@field private seal UnityEngine.GameObject
  34. ---@field private overText RecruitTaskItem__Generate_overText
  35. ---@field private btnNotFinish RecruitTaskItem__Generate_btnNotFinish
  36. local RecruitTaskItemView = class("RecruitTaskItemView")
  37. function RecruitTaskItemView:ctor()
  38. end
  39. ---@private
  40. function RecruitTaskItemView:SetActive(result)
  41. self.gameObject:SetActive(result)
  42. end
  43. ---@private
  44. function RecruitTaskItemView: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. end
  60. ---@private
  61. function RecruitTaskItemView:InitGenerate__1(Root, data)
  62. --[[
  63. Root
  64. --]]
  65. end
  66. ---@private
  67. function RecruitTaskItemView:InitGenerate__2(Root, data)
  68. --[[
  69. IconSmallItem
  70. --]]
  71. local tmp = Root:Find("IconSmallItem").gameObject
  72. if tolua.getpeer(tmp) == nil then
  73. tolua.setpeer(tmp, {})
  74. end
  75. self.iconSmallItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  76. self.iconSmallItem.prefabName = "IconItem"
  77. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  78. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  79. end
  80. ---@private
  81. function RecruitTaskItemView:InitGenerate__3(Root, data)
  82. --[[
  83. TaskName
  84. --]]
  85. local tmp = Root:Find("TaskName").gameObject
  86. if tolua.getpeer(tmp) == nil then
  87. tolua.setpeer(tmp, {})
  88. end
  89. self.taskName = tmp
  90. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  91. end
  92. ---@private
  93. function RecruitTaskItemView:InitGenerate__4(Root, data)
  94. --[[
  95. Dsc
  96. --]]
  97. local tmp = Root:Find("Dsc").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.dsc = tmp
  102. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  103. end
  104. ---@private
  105. function RecruitTaskItemView:InitGenerate__5(Root, data)
  106. --[[
  107. Count
  108. --]]
  109. local tmp = Root:Find("Count").gameObject
  110. if tolua.getpeer(tmp) == nil then
  111. tolua.setpeer(tmp, {})
  112. end
  113. self.count = tmp
  114. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  115. end
  116. ---@private
  117. function RecruitTaskItemView:InitGenerate__6(Root, data)
  118. --[[
  119. BtnGet
  120. --]]
  121. local tmp = Root:Find("BtnGet").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.btnGet = tmp
  126. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  127. end
  128. ---@private
  129. function RecruitTaskItemView:InitGenerate__7(Root, data)
  130. --[[
  131. BtnGet/Text
  132. --]]
  133. local tmp = Root:Find("BtnGet/Text").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.btnGet.text = tmp
  138. end
  139. ---@private
  140. function RecruitTaskItemView:InitGenerate__8(Root, data)
  141. --[[
  142. Seal
  143. --]]
  144. local tmp = Root:Find("Seal").gameObject
  145. if tolua.getpeer(tmp) == nil then
  146. tolua.setpeer(tmp, {})
  147. end
  148. self.seal = tmp
  149. end
  150. ---@private
  151. function RecruitTaskItemView:InitGenerate__9(Root, data)
  152. --[[
  153. Seal/LabelSeal/OverText
  154. --]]
  155. local tmp = Root:Find("Seal/LabelSeal/OverText").gameObject
  156. if tolua.getpeer(tmp) == nil then
  157. tolua.setpeer(tmp, {})
  158. end
  159. self.overText = tmp
  160. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  161. end
  162. ---@private
  163. function RecruitTaskItemView:InitGenerate__10(Root, data)
  164. --[[
  165. BtnNotFinish
  166. --]]
  167. local tmp = Root:Find("BtnNotFinish").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.btnNotFinish = tmp
  172. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  173. end
  174. ---@private
  175. function RecruitTaskItemView:InitGenerate__11(Root, data)
  176. --[[
  177. BtnNotFinish/Text
  178. --]]
  179. local tmp = Root:Find("BtnNotFinish/Text").gameObject
  180. if tolua.getpeer(tmp) == nil then
  181. tolua.setpeer(tmp, {})
  182. end
  183. self.btnNotFinish.text = tmp
  184. end
  185. ---@private
  186. function RecruitTaskItemView:GenerateDestroy()
  187. if tolua.getpeer(self.btnNotFinish.text) ~= nil then
  188. tolua.setpeer(self.btnNotFinish.text, nil)
  189. end
  190. if tolua.getpeer(self.btnNotFinish) ~= nil then
  191. tolua.setpeer(self.btnNotFinish, nil)
  192. end
  193. if tolua.getpeer(self.overText) ~= nil then
  194. tolua.setpeer(self.overText, nil)
  195. end
  196. if tolua.getpeer(self.seal) ~= nil then
  197. tolua.setpeer(self.seal, nil)
  198. end
  199. if tolua.getpeer(self.btnGet.text) ~= nil then
  200. tolua.setpeer(self.btnGet.text, nil)
  201. end
  202. if tolua.getpeer(self.btnGet) ~= nil then
  203. tolua.setpeer(self.btnGet, nil)
  204. end
  205. if tolua.getpeer(self.count) ~= nil then
  206. tolua.setpeer(self.count, nil)
  207. end
  208. if tolua.getpeer(self.dsc) ~= nil then
  209. tolua.setpeer(self.dsc, nil)
  210. end
  211. if tolua.getpeer(self.taskName) ~= nil then
  212. tolua.setpeer(self.taskName, nil)
  213. end
  214. if self.iconSmallItem.GenerateDestroy ~= nil then
  215. self.iconSmallItem:GenerateDestroy()
  216. end
  217. if tolua.getpeer(self.iconSmallItem) ~= nil then
  218. tolua.setpeer(self.iconSmallItem, nil)
  219. end
  220. self.iconSmallItem = nil
  221. self.transform = nil
  222. self.gameObject = nil
  223. self.inited = false
  224. end
  225. return RecruitTaskItemView