UIPetRelationsView_Generate.lua 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. ---@class UIPetRelations__Generate_btnBack
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UIPetRelations__Generate_btnRelation
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIPetRelations__Generate_btnPlayRule
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UIPetRelations__Generate_btnRelations
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UIPetRelations__Generate_petRelationItem
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public rectTransform UnityEngine.RectTransform
  16. ---@class UIPetRelations__Generate_scrollView
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public loopListView SuperScrollView.LoopListView
  19. ---@class UIPetRelations__Generate_AnyBtn
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public button UnityEngine.UI.Button
  22. ---@class UIPetRelations__Generate_uIAnimator
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public animator UnityEngine.Animator
  25. ---@class UIPetRelations__Generate
  26. ---@field private gameObject UnityEngine.GameObject
  27. ---@field private transform UnityEngine.Transform
  28. ---@field private uIAnimator UIPetRelations__Generate_uIAnimator
  29. ---@field private AnyBtn UIPetRelations__Generate_AnyBtn
  30. ---@field private scrollView UIPetRelations__Generate_scrollView
  31. ---@field private petRelationItem UIPetRelations__Generate_petRelationItem
  32. ---@field private btnRelations UIPetRelations__Generate_btnRelations
  33. ---@field private btnPlayRule UIPetRelations__Generate_btnPlayRule
  34. ---@field private btnRelation UIPetRelations__Generate_btnRelation
  35. ---@field private btnBack UIPetRelations__Generate_btnBack
  36. local UIPetRelationsView = class("UIPetRelationsView", require("UIViewBase"))
  37. function UIPetRelationsView:ctor()
  38. end
  39. ---@private
  40. function UIPetRelationsView:SetActive(result)
  41. self.gameObject:SetActive(result)
  42. end
  43. ---@private
  44. function UIPetRelationsView:InitGenerate(Root, data)
  45. self.transform = Root
  46. self.inited = true
  47. if self.super.Init then
  48. self.super.Init(self)
  49. end
  50. local tmp
  51. self:InitGenerate__1(Root,data)
  52. self:InitGenerate__2(Root,data)
  53. self:InitGenerate__3(Root,data)
  54. self:InitGenerate__4(Root,data)
  55. self:InitGenerate__5(Root,data)
  56. self:InitGenerate__6(Root,data)
  57. self:InitGenerate__7(Root,data)
  58. self:InitGenerate__8(Root,data)
  59. end
  60. ---@private
  61. function UIPetRelationsView:InitGenerate__1(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 UIPetRelationsView:InitGenerate__2(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 UIPetRelationsView:InitGenerate__3(Root, data)
  87. --[[
  88. UIAnimator/Window/Scroll View
  89. --]]
  90. local tmp = Root:Find("UIAnimator/Window/Scroll View").gameObject
  91. if tolua.getpeer(tmp) == nil then
  92. tolua.setpeer(tmp, {})
  93. end
  94. self.scrollView = tmp
  95. tmp.loopListView = tmp:GetComponent(Enum.TypeInfo.LoopListView)
  96. end
  97. ---@private
  98. function UIPetRelationsView:InitGenerate__4(Root, data)
  99. --[[
  100. UIAnimator/Window/Scroll View/Viewport/Content/PetRelationItem
  101. --]]
  102. local tmp = Root:Find("UIAnimator/Window/Scroll View/Viewport/Content/PetRelationItem").gameObject
  103. if tolua.getpeer(tmp) == nil then
  104. tolua.setpeer(tmp, {})
  105. end
  106. self.petRelationItem = CommonUtil.BindGridViewItem2LuaStatic("PetRelationItem", tmp)
  107. self.petRelationItem.prefabName = "PetRelationItem"
  108. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  109. end
  110. ---@private
  111. function UIPetRelationsView:InitGenerate__5(Root, data)
  112. --[[
  113. UIAnimator/Window/Title/BtnRelations
  114. --]]
  115. local tmp = Root:Find("UIAnimator/Window/Title/BtnRelations").gameObject
  116. if tolua.getpeer(tmp) == nil then
  117. tolua.setpeer(tmp, {})
  118. end
  119. self.btnRelations = tmp
  120. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  121. end
  122. ---@private
  123. function UIPetRelationsView:InitGenerate__6(Root, data)
  124. --[[
  125. UIAnimator/Window/BGRule/BtnPlayRule
  126. --]]
  127. local tmp = Root:Find("UIAnimator/Window/BGRule/BtnPlayRule").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.btnPlayRule = tmp
  132. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  133. end
  134. ---@private
  135. function UIPetRelationsView:InitGenerate__7(Root, data)
  136. --[[
  137. UIAnimator/Window/BtnRelation
  138. --]]
  139. local tmp = Root:Find("UIAnimator/Window/BtnRelation").gameObject
  140. if tolua.getpeer(tmp) == nil then
  141. tolua.setpeer(tmp, {})
  142. end
  143. self.btnRelation = tmp
  144. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  145. end
  146. ---@private
  147. function UIPetRelationsView:InitGenerate__8(Root, data)
  148. --[[
  149. UIAnimator/Window/BtnBack
  150. --]]
  151. local tmp = Root:Find("UIAnimator/Window/BtnBack").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.btnBack = tmp
  156. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  157. end
  158. ---@private
  159. function UIPetRelationsView:GenerateDestroy()
  160. if tolua.getpeer(self.uIAnimator) ~= nil then
  161. tolua.setpeer(self.uIAnimator, nil)
  162. end
  163. self.uIAnimator = nil
  164. if tolua.getpeer(self.AnyBtn) ~= nil then
  165. tolua.setpeer(self.AnyBtn, nil)
  166. end
  167. self.AnyBtn = nil
  168. if tolua.getpeer(self.scrollView) ~= nil then
  169. tolua.setpeer(self.scrollView, nil)
  170. end
  171. self.scrollView = nil
  172. if self.petRelationItem.GenerateDestroy ~= nil then
  173. self.petRelationItem:GenerateDestroy()
  174. end
  175. if tolua.getpeer(self.petRelationItem) ~= nil then
  176. tolua.setpeer(self.petRelationItem, nil)
  177. end
  178. self.petRelationItem = nil
  179. if tolua.getpeer(self.btnRelations) ~= nil then
  180. tolua.setpeer(self.btnRelations, nil)
  181. end
  182. self.btnRelations = nil
  183. if tolua.getpeer(self.btnPlayRule) ~= nil then
  184. tolua.setpeer(self.btnPlayRule, nil)
  185. end
  186. self.btnPlayRule = nil
  187. if tolua.getpeer(self.btnRelation) ~= nil then
  188. tolua.setpeer(self.btnRelation, nil)
  189. end
  190. self.btnRelation = nil
  191. if tolua.getpeer(self.btnBack) ~= nil then
  192. tolua.setpeer(self.btnBack, nil)
  193. end
  194. self.btnBack = nil
  195. self.transform = nil
  196. self.gameObject = nil
  197. self.inited = false
  198. end
  199. return UIPetRelationsView