UIWishPOPGotView_Generate.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. ---@class UIWishPOPGot__Generate_iconItem
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public rectTransform UnityEngine.RectTransform
  4. ---@field public layoutElement UnityEngine.UI.LayoutElement
  5. ---@class UIWishPOPGot__Generate_wishLuckyItem
  6. ---@field public gameObject UnityEngine.GameObject
  7. ---@field public rectTransform UnityEngine.RectTransform
  8. ---@field public layoutElement UnityEngine.UI.LayoutElement
  9. ---@class UIWishPOPGot__Generate_titleNode
  10. ---@field public gameObject UnityEngine.GameObject
  11. ---@field public text TMPro.TextMeshProUGUI
  12. ---@field public uILocalizeScript UILocalizeScript
  13. ---@class UIWishPOPGot__Generate_scrollView
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public loopGridView SuperScrollView.LoopGridView
  16. ---@field public scrollRect UnityEngine.UI.ScrollRect
  17. ---@class UIWishPOPGot__Generate_AnyBtn
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public button UnityEngine.UI.Button
  20. ---@class UIWishPOPGot__Generate_uIAnimator
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public animator UnityEngine.Animator
  23. ---@class UIWishPOPGot__Generate
  24. ---@field private gameObject UnityEngine.GameObject
  25. ---@field private transform UnityEngine.Transform
  26. ---@field private uIAnimator UIWishPOPGot__Generate_uIAnimator
  27. ---@field private AnyBtn UIWishPOPGot__Generate_AnyBtn
  28. ---@field private scrollView UIWishPOPGot__Generate_scrollView
  29. ---@field private titleNode UIWishPOPGot__Generate_titleNode
  30. ---@field private wishLuckyItem UIWishPOPGot__Generate_wishLuckyItem
  31. ---@field private iconItem UIWishPOPGot__Generate_iconItem
  32. local UIWishPOPGotView = class("UIWishPOPGotView", require("UIViewBase"))
  33. function UIWishPOPGotView:ctor()
  34. end
  35. ---@private
  36. function UIWishPOPGotView:SetActive(result)
  37. self.gameObject:SetActive(result)
  38. end
  39. ---@private
  40. function UIWishPOPGotView:InitGenerate(Root, data)
  41. self.transform = Root
  42. self.inited = true
  43. if self.super.Init then
  44. self.super.Init(self)
  45. end
  46. local tmp
  47. self:InitGenerate__1(Root,data)
  48. self:InitGenerate__2(Root,data)
  49. self:InitGenerate__3(Root,data)
  50. self:InitGenerate__4(Root,data)
  51. self:InitGenerate__5(Root,data)
  52. self:InitGenerate__6(Root,data)
  53. end
  54. ---@private
  55. function UIWishPOPGotView:InitGenerate__1(Root, data)
  56. --[[
  57. UIAnimator
  58. --]]
  59. local tmp = Root:Find("UIAnimator").gameObject
  60. if tolua.getpeer(tmp) == nil then
  61. tolua.setpeer(tmp, {})
  62. end
  63. self.uIAnimator = tmp
  64. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  65. tmp.animator.logWarnings = false
  66. end
  67. ---@private
  68. function UIWishPOPGotView:InitGenerate__2(Root, data)
  69. --[[
  70. UIAnimator/Alpha
  71. --]]
  72. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.AnyBtn = tmp
  77. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  78. end
  79. ---@private
  80. function UIWishPOPGotView:InitGenerate__3(Root, data)
  81. --[[
  82. UIAnimator/Window/ScrollView
  83. --]]
  84. local tmp = Root:Find("UIAnimator/Window/ScrollView").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.scrollView = tmp
  89. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  90. tmp.scrollRect = tmp:GetComponent(Enum.TypeInfo.ScrollRect)
  91. end
  92. ---@private
  93. function UIWishPOPGotView:InitGenerate__4(Root, data)
  94. --[[
  95. UIAnimator/Window/ScrollView/Bg/Title/Image/Text
  96. --]]
  97. local tmp = Root:Find("UIAnimator/Window/ScrollView/Bg/Title/Image/Text").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.titleNode = tmp
  102. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  103. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  104. end
  105. ---@private
  106. function UIWishPOPGotView:InitGenerate__5(Root, data)
  107. --[[
  108. UIAnimator/Window/ScrollView/Viewport/WishLuckyItem
  109. --]]
  110. local tmp = Root:Find("UIAnimator/Window/ScrollView/Viewport/WishLuckyItem").gameObject
  111. if tolua.getpeer(tmp) == nil then
  112. tolua.setpeer(tmp, {})
  113. end
  114. self.wishLuckyItem = CommonUtil.BindGridViewItem2LuaStatic("WishLuckyItem", tmp)
  115. self.wishLuckyItem.prefabName = "WishLuckyItem"
  116. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  117. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  118. end
  119. ---@private
  120. function UIWishPOPGotView:InitGenerate__6(Root, data)
  121. --[[
  122. UIAnimator/Window/ScrollView/Viewport/IconItem
  123. --]]
  124. local tmp = Root:Find("UIAnimator/Window/ScrollView/Viewport/IconItem").gameObject
  125. if tolua.getpeer(tmp) == nil then
  126. tolua.setpeer(tmp, {})
  127. end
  128. self.iconItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  129. self.iconItem.prefabName = "IconItem"
  130. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  131. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  132. end
  133. ---@private
  134. function UIWishPOPGotView:GenerateDestroy()
  135. if tolua.getpeer(self.uIAnimator) ~= nil then
  136. tolua.setpeer(self.uIAnimator, nil)
  137. end
  138. self.uIAnimator = nil
  139. if tolua.getpeer(self.AnyBtn) ~= nil then
  140. tolua.setpeer(self.AnyBtn, nil)
  141. end
  142. self.AnyBtn = nil
  143. if tolua.getpeer(self.scrollView) ~= nil then
  144. tolua.setpeer(self.scrollView, nil)
  145. end
  146. self.scrollView = nil
  147. if tolua.getpeer(self.titleNode) ~= nil then
  148. tolua.setpeer(self.titleNode, nil)
  149. end
  150. self.titleNode = nil
  151. if self.wishLuckyItem.GenerateDestroy ~= nil then
  152. self.wishLuckyItem:GenerateDestroy()
  153. end
  154. if tolua.getpeer(self.wishLuckyItem) ~= nil then
  155. tolua.setpeer(self.wishLuckyItem, nil)
  156. end
  157. self.wishLuckyItem = nil
  158. if self.iconItem.GenerateDestroy ~= nil then
  159. self.iconItem:GenerateDestroy()
  160. end
  161. if tolua.getpeer(self.iconItem) ~= nil then
  162. tolua.setpeer(self.iconItem, nil)
  163. end
  164. self.iconItem = nil
  165. self.transform = nil
  166. self.gameObject = nil
  167. self.inited = false
  168. end
  169. return UIWishPOPGotView