RuneShopGoodsItem_Generate.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. ---@class RuneShopGoodsItem__Generate_presentPrice_currency
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text TMPro.TextMeshProUGUI
  4. ---@class RuneShopGoodsItem__Generate_presentPrice_icon
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class RuneShopGoodsItem__Generate_presentPrice_number
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text TMPro.TextMeshProUGUI
  10. ---@class RuneShopGoodsItem__Generate_presentPrice_shadow
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class RuneShopGoodsItem__Generate_presentPrice
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@field public shadow RuneShopGoodsItem__Generate_presentPrice_shadow
  17. ---@field public number RuneShopGoodsItem__Generate_presentPrice_number
  18. ---@field public icon RuneShopGoodsItem__Generate_presentPrice_icon
  19. ---@field public currency RuneShopGoodsItem__Generate_presentPrice_currency
  20. ---@class RuneShopGoodsItem__Generate_discount_text
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public text TMPro.TextMeshProUGUI
  23. ---@class RuneShopGoodsItem__Generate_discount
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public text RuneShopGoodsItem__Generate_discount_text
  26. ---@class RuneShopGoodsItem__Generate_purchaseLimit
  27. ---@field public gameObject UnityEngine.GameObject
  28. ---@field public text UnityEngine.UI.Text
  29. ---@class RuneShopGoodsItem__Generate_specialReward_num
  30. ---@field public gameObject UnityEngine.GameObject
  31. ---@field public image UnityEngine.UI.Image
  32. ---@class RuneShopGoodsItem__Generate_specialReward_bg
  33. ---@field public gameObject UnityEngine.GameObject
  34. ---@field public image UnityEngine.UI.Image
  35. ---@class RuneShopGoodsItem__Generate_specialReward
  36. ---@field public gameObject UnityEngine.GameObject
  37. ---@field public bg RuneShopGoodsItem__Generate_specialReward_bg
  38. ---@field public num RuneShopGoodsItem__Generate_specialReward_num
  39. ---@class RuneShopGoodsItem__Generate_iconSmallItem3
  40. ---@field public gameObject UnityEngine.GameObject
  41. ---@field public rectTransform UnityEngine.RectTransform
  42. ---@field public layoutElement UnityEngine.UI.LayoutElement
  43. ---@class RuneShopGoodsItem__Generate_iconSmallItem2
  44. ---@field public gameObject UnityEngine.GameObject
  45. ---@field public rectTransform UnityEngine.RectTransform
  46. ---@field public layoutElement UnityEngine.UI.LayoutElement
  47. ---@class RuneShopGoodsItem__Generate_iconSmallItem1
  48. ---@field public gameObject UnityEngine.GameObject
  49. ---@field public rectTransform UnityEngine.RectTransform
  50. ---@field public layoutElement UnityEngine.UI.LayoutElement
  51. ---@class RuneShopGoodsItem__Generate_itemIcon
  52. ---@field public gameObject UnityEngine.GameObject
  53. ---@field public image UnityEngine.UI.Image
  54. ---@class RuneShopGoodsItem__Generate_itemName
  55. ---@field public gameObject UnityEngine.GameObject
  56. ---@field public text UnityEngine.UI.Text
  57. ---@class RuneShopGoodsItem__Generate
  58. ---@field private gameObject UnityEngine.GameObject
  59. ---@field private transform UnityEngine.Transform
  60. ---@field private button UnityEngine.UI.Button
  61. ---@field private itemName RuneShopGoodsItem__Generate_itemName
  62. ---@field private itemIcon RuneShopGoodsItem__Generate_itemIcon
  63. ---@field private goodsItems UnityEngine.GameObject
  64. ---@field private iconSmallItem1 RuneShopGoodsItem__Generate_iconSmallItem1
  65. ---@field private iconSmallItem2 RuneShopGoodsItem__Generate_iconSmallItem2
  66. ---@field private iconSmallItem3 RuneShopGoodsItem__Generate_iconSmallItem3
  67. ---@field private specialReward RuneShopGoodsItem__Generate_specialReward
  68. ---@field private purchaseLimit RuneShopGoodsItem__Generate_purchaseLimit
  69. ---@field private discount RuneShopGoodsItem__Generate_discount
  70. ---@field private label UnityEngine.GameObject
  71. ---@field private presentPrice RuneShopGoodsItem__Generate_presentPrice
  72. ---@field private soldout UnityEngine.GameObject
  73. local RuneShopGoodsItemView = class("RuneShopGoodsItemView")
  74. function RuneShopGoodsItemView:ctor()
  75. end
  76. ---@private
  77. function RuneShopGoodsItemView:SetActive(result)
  78. self.gameObject:SetActive(result)
  79. end
  80. ---@private
  81. function RuneShopGoodsItemView:InitGenerate(Root, data)
  82. self.transform = Root
  83. self.inited = true
  84. local tmp
  85. self:InitGenerate__1(Root,data)
  86. self:InitGenerate__2(Root,data)
  87. self:InitGenerate__3(Root,data)
  88. self:InitGenerate__4(Root,data)
  89. self:InitGenerate__5(Root,data)
  90. self:InitGenerate__6(Root,data)
  91. self:InitGenerate__7(Root,data)
  92. self:InitGenerate__8(Root,data)
  93. self:InitGenerate__9(Root,data)
  94. self:InitGenerate__10(Root,data)
  95. self:InitGenerate__11(Root,data)
  96. self:InitGenerate__12(Root,data)
  97. self:InitGenerate__13(Root,data)
  98. self:InitGenerate__14(Root,data)
  99. self:InitGenerate__15(Root,data)
  100. self:InitGenerate__16(Root,data)
  101. self:InitGenerate__17(Root,data)
  102. self:InitGenerate__18(Root,data)
  103. self:InitGenerate__19(Root,data)
  104. self:InitGenerate__20(Root,data)
  105. end
  106. ---@private
  107. function RuneShopGoodsItemView:InitGenerate__1(Root, data)
  108. --[[
  109. Root
  110. --]]
  111. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  112. end
  113. ---@private
  114. function RuneShopGoodsItemView:InitGenerate__2(Root, data)
  115. --[[
  116. GoodsName/ItemName
  117. --]]
  118. local tmp = Root:Find("GoodsName/ItemName").gameObject
  119. if tolua.getpeer(tmp) == nil then
  120. tolua.setpeer(tmp, {})
  121. end
  122. self.itemName = tmp
  123. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  124. end
  125. ---@private
  126. function RuneShopGoodsItemView:InitGenerate__3(Root, data)
  127. --[[
  128. ItemIcon
  129. --]]
  130. local tmp = Root:Find("ItemIcon").gameObject
  131. if tolua.getpeer(tmp) == nil then
  132. tolua.setpeer(tmp, {})
  133. end
  134. self.itemIcon = tmp
  135. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  136. end
  137. ---@private
  138. function RuneShopGoodsItemView:InitGenerate__4(Root, data)
  139. --[[
  140. MoreDsc/GoodsItems
  141. --]]
  142. local tmp = Root:Find("MoreDsc/GoodsItems").gameObject
  143. if tolua.getpeer(tmp) == nil then
  144. tolua.setpeer(tmp, {})
  145. end
  146. self.goodsItems = tmp
  147. end
  148. ---@private
  149. function RuneShopGoodsItemView:InitGenerate__5(Root, data)
  150. --[[
  151. MoreDsc/GoodsItems/LayoutScale/IconSmallItem1
  152. --]]
  153. local tmp = Root:Find("MoreDsc/GoodsItems/LayoutScale/IconSmallItem1").gameObject
  154. if tolua.getpeer(tmp) == nil then
  155. tolua.setpeer(tmp, {})
  156. end
  157. self.iconSmallItem1 = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  158. self.iconSmallItem1.prefabName = "IconItem"
  159. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  160. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  161. end
  162. ---@private
  163. function RuneShopGoodsItemView:InitGenerate__6(Root, data)
  164. --[[
  165. MoreDsc/GoodsItems/LayoutScale/IconSmallItem2
  166. --]]
  167. local tmp = Root:Find("MoreDsc/GoodsItems/LayoutScale/IconSmallItem2").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.iconSmallItem2 = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  172. self.iconSmallItem2.prefabName = "IconItem"
  173. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  174. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  175. end
  176. ---@private
  177. function RuneShopGoodsItemView:InitGenerate__7(Root, data)
  178. --[[
  179. MoreDsc/GoodsItems/LayoutScale/IconSmallItem3
  180. --]]
  181. local tmp = Root:Find("MoreDsc/GoodsItems/LayoutScale/IconSmallItem3").gameObject
  182. if tolua.getpeer(tmp) == nil then
  183. tolua.setpeer(tmp, {})
  184. end
  185. self.iconSmallItem3 = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  186. self.iconSmallItem3.prefabName = "IconItem"
  187. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  188. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  189. end
  190. ---@private
  191. function RuneShopGoodsItemView:InitGenerate__8(Root, data)
  192. --[[
  193. MoreDsc/SpecialReward
  194. --]]
  195. local tmp = Root:Find("MoreDsc/SpecialReward").gameObject
  196. if tolua.getpeer(tmp) == nil then
  197. tolua.setpeer(tmp, {})
  198. end
  199. self.specialReward = tmp
  200. end
  201. ---@private
  202. function RuneShopGoodsItemView:InitGenerate__9(Root, data)
  203. --[[
  204. MoreDsc/SpecialReward/Bg
  205. --]]
  206. local tmp = Root:Find("MoreDsc/SpecialReward/Bg").gameObject
  207. if tolua.getpeer(tmp) == nil then
  208. tolua.setpeer(tmp, {})
  209. end
  210. self.specialReward.bg = tmp
  211. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  212. end
  213. ---@private
  214. function RuneShopGoodsItemView:InitGenerate__10(Root, data)
  215. --[[
  216. MoreDsc/SpecialReward/Num
  217. --]]
  218. local tmp = Root:Find("MoreDsc/SpecialReward/Num").gameObject
  219. if tolua.getpeer(tmp) == nil then
  220. tolua.setpeer(tmp, {})
  221. end
  222. self.specialReward.num = tmp
  223. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  224. end
  225. ---@private
  226. function RuneShopGoodsItemView:InitGenerate__11(Root, data)
  227. --[[
  228. MoreDsc/PurchaseLimit
  229. --]]
  230. local tmp = Root:Find("MoreDsc/PurchaseLimit").gameObject
  231. if tolua.getpeer(tmp) == nil then
  232. tolua.setpeer(tmp, {})
  233. end
  234. self.purchaseLimit = tmp
  235. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  236. end
  237. ---@private
  238. function RuneShopGoodsItemView:InitGenerate__12(Root, data)
  239. --[[
  240. Discount
  241. --]]
  242. local tmp = Root:Find("Discount").gameObject
  243. if tolua.getpeer(tmp) == nil then
  244. tolua.setpeer(tmp, {})
  245. end
  246. self.discount = tmp
  247. end
  248. ---@private
  249. function RuneShopGoodsItemView:InitGenerate__13(Root, data)
  250. --[[
  251. Discount/Label
  252. --]]
  253. local tmp = Root:Find("Discount/Label").gameObject
  254. if tolua.getpeer(tmp) == nil then
  255. tolua.setpeer(tmp, {})
  256. end
  257. self.label = tmp
  258. end
  259. ---@private
  260. function RuneShopGoodsItemView:InitGenerate__14(Root, data)
  261. --[[
  262. Discount/Text
  263. --]]
  264. local tmp = Root:Find("Discount/Text").gameObject
  265. if tolua.getpeer(tmp) == nil then
  266. tolua.setpeer(tmp, {})
  267. end
  268. self.discount.text = tmp
  269. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  270. end
  271. ---@private
  272. function RuneShopGoodsItemView:InitGenerate__15(Root, data)
  273. --[[
  274. PresentPrice
  275. --]]
  276. local tmp = Root:Find("PresentPrice").gameObject
  277. if tolua.getpeer(tmp) == nil then
  278. tolua.setpeer(tmp, {})
  279. end
  280. self.presentPrice = tmp
  281. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  282. end
  283. ---@private
  284. function RuneShopGoodsItemView:InitGenerate__16(Root, data)
  285. --[[
  286. PresentPrice/shadow
  287. --]]
  288. local tmp = Root:Find("PresentPrice/shadow").gameObject
  289. if tolua.getpeer(tmp) == nil then
  290. tolua.setpeer(tmp, {})
  291. end
  292. self.presentPrice.shadow = tmp
  293. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  294. end
  295. ---@private
  296. function RuneShopGoodsItemView:InitGenerate__17(Root, data)
  297. --[[
  298. PresentPrice/Number
  299. --]]
  300. local tmp = Root:Find("PresentPrice/Number").gameObject
  301. if tolua.getpeer(tmp) == nil then
  302. tolua.setpeer(tmp, {})
  303. end
  304. self.presentPrice.number = tmp
  305. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  306. end
  307. ---@private
  308. function RuneShopGoodsItemView:InitGenerate__18(Root, data)
  309. --[[
  310. PresentPrice/Icon
  311. --]]
  312. local tmp = Root:Find("PresentPrice/Icon").gameObject
  313. if tolua.getpeer(tmp) == nil then
  314. tolua.setpeer(tmp, {})
  315. end
  316. self.presentPrice.icon = tmp
  317. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  318. end
  319. ---@private
  320. function RuneShopGoodsItemView:InitGenerate__19(Root, data)
  321. --[[
  322. PresentPrice/Currency
  323. --]]
  324. local tmp = Root:Find("PresentPrice/Currency").gameObject
  325. if tolua.getpeer(tmp) == nil then
  326. tolua.setpeer(tmp, {})
  327. end
  328. self.presentPrice.currency = tmp
  329. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  330. end
  331. ---@private
  332. function RuneShopGoodsItemView:InitGenerate__20(Root, data)
  333. --[[
  334. Soldout
  335. --]]
  336. local tmp = Root:Find("Soldout").gameObject
  337. if tolua.getpeer(tmp) == nil then
  338. tolua.setpeer(tmp, {})
  339. end
  340. self.soldout = tmp
  341. end
  342. ---@private
  343. function RuneShopGoodsItemView:GenerateDestroy()
  344. if tolua.getpeer(self.soldout) ~= nil then
  345. tolua.setpeer(self.soldout, nil)
  346. end
  347. if tolua.getpeer(self.presentPrice.currency) ~= nil then
  348. tolua.setpeer(self.presentPrice.currency, nil)
  349. end
  350. if tolua.getpeer(self.presentPrice.icon) ~= nil then
  351. tolua.setpeer(self.presentPrice.icon, nil)
  352. end
  353. if tolua.getpeer(self.presentPrice.number) ~= nil then
  354. tolua.setpeer(self.presentPrice.number, nil)
  355. end
  356. if tolua.getpeer(self.presentPrice.shadow) ~= nil then
  357. tolua.setpeer(self.presentPrice.shadow, nil)
  358. end
  359. if tolua.getpeer(self.presentPrice) ~= nil then
  360. tolua.setpeer(self.presentPrice, nil)
  361. end
  362. if tolua.getpeer(self.discount.text) ~= nil then
  363. tolua.setpeer(self.discount.text, nil)
  364. end
  365. if tolua.getpeer(self.specialReward.num) ~= nil then
  366. tolua.setpeer(self.specialReward.num, nil)
  367. end
  368. if tolua.getpeer(self.specialReward.bg) ~= nil then
  369. tolua.setpeer(self.specialReward.bg, nil)
  370. end
  371. if tolua.getpeer(self.itemIcon) ~= nil then
  372. tolua.setpeer(self.itemIcon, nil)
  373. end
  374. if tolua.getpeer(self.itemName) ~= nil then
  375. tolua.setpeer(self.itemName, nil)
  376. end
  377. if tolua.getpeer(self.goodsItems) ~= nil then
  378. tolua.setpeer(self.goodsItems, nil)
  379. end
  380. self.goodsItems = nil
  381. if self.iconSmallItem1.GenerateDestroy ~= nil then
  382. self.iconSmallItem1:GenerateDestroy()
  383. end
  384. if tolua.getpeer(self.iconSmallItem1) ~= nil then
  385. tolua.setpeer(self.iconSmallItem1, nil)
  386. end
  387. self.iconSmallItem1 = nil
  388. if self.iconSmallItem2.GenerateDestroy ~= nil then
  389. self.iconSmallItem2:GenerateDestroy()
  390. end
  391. if tolua.getpeer(self.iconSmallItem2) ~= nil then
  392. tolua.setpeer(self.iconSmallItem2, nil)
  393. end
  394. self.iconSmallItem2 = nil
  395. if self.iconSmallItem3.GenerateDestroy ~= nil then
  396. self.iconSmallItem3:GenerateDestroy()
  397. end
  398. if tolua.getpeer(self.iconSmallItem3) ~= nil then
  399. tolua.setpeer(self.iconSmallItem3, nil)
  400. end
  401. self.iconSmallItem3 = nil
  402. if tolua.getpeer(self.specialReward) ~= nil then
  403. tolua.setpeer(self.specialReward, nil)
  404. end
  405. self.specialReward = nil
  406. if tolua.getpeer(self.purchaseLimit) ~= nil then
  407. tolua.setpeer(self.purchaseLimit, nil)
  408. end
  409. self.purchaseLimit = nil
  410. if tolua.getpeer(self.discount) ~= nil then
  411. tolua.setpeer(self.discount, nil)
  412. end
  413. self.discount = nil
  414. if tolua.getpeer(self.label) ~= nil then
  415. tolua.setpeer(self.label, nil)
  416. end
  417. self.label = nil
  418. self.transform = nil
  419. self.gameObject = nil
  420. self.inited = false
  421. end
  422. return RuneShopGoodsItemView