UIPetStampView_Generate.lua 5.5 KB

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