UIShopView_Generate.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. ---@class UIShop__Generate_talkBoxTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public uILocalizeScript UILocalizeScript
  4. ---@class UIShop__Generate_shopLabelToggleItem
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIShop__Generate_labelScrollView
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public loopGridView SuperScrollView.LoopGridView
  10. ---@class UIShop__Generate_btnClose
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UIShop__Generate_shopGoodsItem
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UIShop__Generate_goodsScrollView
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public loopGridView SuperScrollView.LoopGridView
  19. ---@class UIShop__Generate_btnRefresh
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public button UnityEngine.UI.Button
  22. ---@class UIShop__Generate_textTime
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public text UnityEngine.UI.Text
  25. ---@class UIShop__Generate_AnyBtn
  26. ---@field public gameObject UnityEngine.GameObject
  27. ---@field public button UnityEngine.UI.Button
  28. ---@class UIShop__Generate_uIAnimator
  29. ---@field public gameObject UnityEngine.GameObject
  30. ---@field public animator UnityEngine.Animator
  31. ---@class UIShop__Generate
  32. ---@field private gameObject UnityEngine.GameObject
  33. ---@field private transform UnityEngine.Transform
  34. ---@field private uIAnimator UIShop__Generate_uIAnimator
  35. ---@field private AnyBtn UIShop__Generate_AnyBtn
  36. ---@field private timeBox UnityEngine.GameObject
  37. ---@field private textTime UIShop__Generate_textTime
  38. ---@field private btnRefresh UIShop__Generate_btnRefresh
  39. ---@field private goodsScrollView UIShop__Generate_goodsScrollView
  40. ---@field private shopGoodsItem UIShop__Generate_shopGoodsItem
  41. ---@field private btnClose UIShop__Generate_btnClose
  42. ---@field private labelScrollView UIShop__Generate_labelScrollView
  43. ---@field private shopLabelToggleItem UIShop__Generate_shopLabelToggleItem
  44. ---@field private rightArrow UnityEngine.GameObject
  45. ---@field private leftArrow UnityEngine.GameObject
  46. ---@field private talkBoxTxt UIShop__Generate_talkBoxTxt
  47. ---@field private resourceBox UnityEngine.GameObject
  48. ---@field private shopCurrencyItem UnityEngine.GameObject
  49. local UIShopView = class("UIShopView", require("UIViewBase"))
  50. function UIShopView:ctor()
  51. end
  52. ---@private
  53. function UIShopView:SetActive(result)
  54. self.gameObject:SetActive(result)
  55. end
  56. ---@private
  57. function UIShopView:InitGenerate(Root, data)
  58. self.transform = Root
  59. self.inited = true
  60. if self.super.Init then
  61. self.super.Init(self)
  62. end
  63. local tmp
  64. self:InitGenerate__1(Root,data)
  65. self:InitGenerate__2(Root,data)
  66. self:InitGenerate__3(Root,data)
  67. self:InitGenerate__4(Root,data)
  68. self:InitGenerate__5(Root,data)
  69. self:InitGenerate__6(Root,data)
  70. self:InitGenerate__7(Root,data)
  71. self:InitGenerate__8(Root,data)
  72. self:InitGenerate__9(Root,data)
  73. self:InitGenerate__10(Root,data)
  74. self:InitGenerate__11(Root,data)
  75. self:InitGenerate__12(Root,data)
  76. self:InitGenerate__13(Root,data)
  77. self:InitGenerate__14(Root,data)
  78. self:InitGenerate__15(Root,data)
  79. end
  80. ---@private
  81. function UIShopView:InitGenerate__1(Root, data)
  82. --[[
  83. UIAnimator
  84. --]]
  85. local tmp = Root:Find("UIAnimator").gameObject
  86. if tolua.getpeer(tmp) == nil then
  87. tolua.setpeer(tmp, {})
  88. end
  89. self.uIAnimator = tmp
  90. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  91. tmp.animator.logWarnings = false
  92. end
  93. ---@private
  94. function UIShopView:InitGenerate__2(Root, data)
  95. --[[
  96. UIAnimator/Alpha
  97. --]]
  98. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  99. if tolua.getpeer(tmp) == nil then
  100. tolua.setpeer(tmp, {})
  101. end
  102. self.AnyBtn = tmp
  103. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  104. end
  105. ---@private
  106. function UIShopView:InitGenerate__3(Root, data)
  107. --[[
  108. UIAnimator/Window/GoodsBox/TimeBox
  109. --]]
  110. local tmp = Root:Find("UIAnimator/Window/GoodsBox/TimeBox").gameObject
  111. if tolua.getpeer(tmp) == nil then
  112. tolua.setpeer(tmp, {})
  113. end
  114. self.timeBox = tmp
  115. end
  116. ---@private
  117. function UIShopView:InitGenerate__4(Root, data)
  118. --[[
  119. UIAnimator/Window/GoodsBox/TimeBox/TextTime
  120. --]]
  121. local tmp = Root:Find("UIAnimator/Window/GoodsBox/TimeBox/TextTime").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.textTime = tmp
  126. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  127. end
  128. ---@private
  129. function UIShopView:InitGenerate__5(Root, data)
  130. --[[
  131. UIAnimator/Window/GoodsBox/TimeBox/BtnRefresh
  132. --]]
  133. local tmp = Root:Find("UIAnimator/Window/GoodsBox/TimeBox/BtnRefresh").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.btnRefresh = tmp
  138. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  139. end
  140. ---@private
  141. function UIShopView:InitGenerate__6(Root, data)
  142. --[[
  143. UIAnimator/Window/GoodsBox/GoodsScrollView
  144. --]]
  145. local tmp = Root:Find("UIAnimator/Window/GoodsBox/GoodsScrollView").gameObject
  146. if tolua.getpeer(tmp) == nil then
  147. tolua.setpeer(tmp, {})
  148. end
  149. self.goodsScrollView = tmp
  150. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  151. end
  152. ---@private
  153. function UIShopView:InitGenerate__7(Root, data)
  154. --[[
  155. UIAnimator/Window/GoodsBox/GoodsScrollView/Viewport/Content/ShopGoodsItem
  156. --]]
  157. local tmp = Root:Find("UIAnimator/Window/GoodsBox/GoodsScrollView/Viewport/Content/ShopGoodsItem").gameObject
  158. if tolua.getpeer(tmp) == nil then
  159. tolua.setpeer(tmp, {})
  160. end
  161. self.shopGoodsItem = CommonUtil.BindGridViewItem2LuaStatic("ShopGoodsItem", tmp)
  162. self.shopGoodsItem.prefabName = "ShopGoodsItem"
  163. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  164. end
  165. ---@private
  166. function UIShopView:InitGenerate__8(Root, data)
  167. --[[
  168. UIAnimator/Window/BottomAnim/BtnClose
  169. --]]
  170. local tmp = Root:Find("UIAnimator/Window/BottomAnim/BtnClose").gameObject
  171. if tolua.getpeer(tmp) == nil then
  172. tolua.setpeer(tmp, {})
  173. end
  174. self.btnClose = tmp
  175. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  176. end
  177. ---@private
  178. function UIShopView:InitGenerate__9(Root, data)
  179. --[[
  180. UIAnimator/Window/TopView/LabelScrollView
  181. --]]
  182. local tmp = Root:Find("UIAnimator/Window/TopView/LabelScrollView").gameObject
  183. if tolua.getpeer(tmp) == nil then
  184. tolua.setpeer(tmp, {})
  185. end
  186. self.labelScrollView = tmp
  187. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  188. end
  189. ---@private
  190. function UIShopView:InitGenerate__10(Root, data)
  191. --[[
  192. UIAnimator/Window/TopView/LabelScrollView/Viewport/Content/ShopLabelToggleItem
  193. --]]
  194. local tmp = Root:Find("UIAnimator/Window/TopView/LabelScrollView/Viewport/Content/ShopLabelToggleItem").gameObject
  195. if tolua.getpeer(tmp) == nil then
  196. tolua.setpeer(tmp, {})
  197. end
  198. self.shopLabelToggleItem = CommonUtil.BindGridViewItem2LuaStatic("ShopLabelToggleItem", tmp)
  199. self.shopLabelToggleItem.prefabName = "ShopLabelToggleItem"
  200. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  201. end
  202. ---@private
  203. function UIShopView:InitGenerate__11(Root, data)
  204. --[[
  205. UIAnimator/Window/TopView/RightArrow
  206. --]]
  207. local tmp = Root:Find("UIAnimator/Window/TopView/RightArrow").gameObject
  208. if tolua.getpeer(tmp) == nil then
  209. tolua.setpeer(tmp, {})
  210. end
  211. self.rightArrow = tmp
  212. end
  213. ---@private
  214. function UIShopView:InitGenerate__12(Root, data)
  215. --[[
  216. UIAnimator/Window/TopView/LeftArrow
  217. --]]
  218. local tmp = Root:Find("UIAnimator/Window/TopView/LeftArrow").gameObject
  219. if tolua.getpeer(tmp) == nil then
  220. tolua.setpeer(tmp, {})
  221. end
  222. self.leftArrow = tmp
  223. end
  224. ---@private
  225. function UIShopView:InitGenerate__13(Root, data)
  226. --[[
  227. UIAnimator/Window/TopView/TalkBox/TalkBoxTxt
  228. --]]
  229. local tmp = Root:Find("UIAnimator/Window/TopView/TalkBox/TalkBoxTxt").gameObject
  230. if tolua.getpeer(tmp) == nil then
  231. tolua.setpeer(tmp, {})
  232. end
  233. self.talkBoxTxt = tmp
  234. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  235. end
  236. ---@private
  237. function UIShopView:InitGenerate__14(Root, data)
  238. --[[
  239. UIAnimator/Window/TopView/ResourceBox
  240. --]]
  241. local tmp = Root:Find("UIAnimator/Window/TopView/ResourceBox").gameObject
  242. if tolua.getpeer(tmp) == nil then
  243. tolua.setpeer(tmp, {})
  244. end
  245. self.resourceBox = tmp
  246. end
  247. ---@private
  248. function UIShopView:InitGenerate__15(Root, data)
  249. --[[
  250. UIAnimator/Window/TopView/ResourceBox/ShopCurrencyItem
  251. --]]
  252. local tmp = Root:Find("UIAnimator/Window/TopView/ResourceBox/ShopCurrencyItem").gameObject
  253. if tolua.getpeer(tmp) == nil then
  254. tolua.setpeer(tmp, {})
  255. end
  256. self.shopCurrencyItem = CommonUtil.BindGridViewItem2LuaStatic("ShopCurrencyItem", tmp)
  257. self.shopCurrencyItem.prefabName = "ShopCurrencyItem"
  258. end
  259. ---@private
  260. function UIShopView:GenerateDestroy()
  261. if tolua.getpeer(self.uIAnimator) ~= nil then
  262. tolua.setpeer(self.uIAnimator, nil)
  263. end
  264. self.uIAnimator = nil
  265. if tolua.getpeer(self.AnyBtn) ~= nil then
  266. tolua.setpeer(self.AnyBtn, nil)
  267. end
  268. self.AnyBtn = nil
  269. if tolua.getpeer(self.timeBox) ~= nil then
  270. tolua.setpeer(self.timeBox, nil)
  271. end
  272. self.timeBox = nil
  273. if tolua.getpeer(self.textTime) ~= nil then
  274. tolua.setpeer(self.textTime, nil)
  275. end
  276. self.textTime = nil
  277. if tolua.getpeer(self.btnRefresh) ~= nil then
  278. tolua.setpeer(self.btnRefresh, nil)
  279. end
  280. self.btnRefresh = nil
  281. if tolua.getpeer(self.goodsScrollView) ~= nil then
  282. tolua.setpeer(self.goodsScrollView, nil)
  283. end
  284. self.goodsScrollView = nil
  285. if self.shopGoodsItem.GenerateDestroy ~= nil then
  286. self.shopGoodsItem:GenerateDestroy()
  287. end
  288. if tolua.getpeer(self.shopGoodsItem) ~= nil then
  289. tolua.setpeer(self.shopGoodsItem, nil)
  290. end
  291. self.shopGoodsItem = nil
  292. if tolua.getpeer(self.btnClose) ~= nil then
  293. tolua.setpeer(self.btnClose, nil)
  294. end
  295. self.btnClose = nil
  296. if tolua.getpeer(self.labelScrollView) ~= nil then
  297. tolua.setpeer(self.labelScrollView, nil)
  298. end
  299. self.labelScrollView = nil
  300. if self.shopLabelToggleItem.GenerateDestroy ~= nil then
  301. self.shopLabelToggleItem:GenerateDestroy()
  302. end
  303. if tolua.getpeer(self.shopLabelToggleItem) ~= nil then
  304. tolua.setpeer(self.shopLabelToggleItem, nil)
  305. end
  306. self.shopLabelToggleItem = nil
  307. if tolua.getpeer(self.rightArrow) ~= nil then
  308. tolua.setpeer(self.rightArrow, nil)
  309. end
  310. self.rightArrow = nil
  311. if tolua.getpeer(self.leftArrow) ~= nil then
  312. tolua.setpeer(self.leftArrow, nil)
  313. end
  314. self.leftArrow = nil
  315. if tolua.getpeer(self.talkBoxTxt) ~= nil then
  316. tolua.setpeer(self.talkBoxTxt, nil)
  317. end
  318. self.talkBoxTxt = nil
  319. if tolua.getpeer(self.resourceBox) ~= nil then
  320. tolua.setpeer(self.resourceBox, nil)
  321. end
  322. self.resourceBox = nil
  323. if self.shopCurrencyItem.GenerateDestroy ~= nil then
  324. self.shopCurrencyItem:GenerateDestroy()
  325. end
  326. if tolua.getpeer(self.shopCurrencyItem) ~= nil then
  327. tolua.setpeer(self.shopCurrencyItem, nil)
  328. end
  329. self.shopCurrencyItem = nil
  330. self.transform = nil
  331. self.gameObject = nil
  332. self.inited = false
  333. end
  334. return UIShopView