UIMaterialsTipsView_Generate.lua 5.8 KB

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