DiffTaskItem_Generate.lua 6.5 KB

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