UIVoyageRankView_Generate.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. ---@class UIVoyageRank__Generate_loadingItem
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public rectTransform UnityEngine.RectTransform
  4. ---@field public layoutElement UnityEngine.UI.LayoutElement
  5. ---@class UIVoyageRank__Generate_rankList
  6. ---@field public gameObject UnityEngine.GameObject
  7. ---@field public loopListView SuperScrollView.LoopListView
  8. ---@class UIVoyageRank__Generate_btnClose
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public button UnityEngine.UI.Button
  11. ---@class UIVoyageRank__Generate_AnyBtn
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public button UnityEngine.UI.Button
  14. ---@class UIVoyageRank__Generate
  15. ---@field private gameObject UnityEngine.GameObject
  16. ---@field private transform UnityEngine.Transform
  17. ---@field private AnyBtn UIVoyageRank__Generate_AnyBtn
  18. ---@field private btnClose UIVoyageRank__Generate_btnClose
  19. ---@field private rankList UIVoyageRank__Generate_rankList
  20. ---@field private loadingItem UIVoyageRank__Generate_loadingItem
  21. ---@field private voyageRankItem UnityEngine.GameObject
  22. ---@field private selfVoyageRankItem UnityEngine.GameObject
  23. local UIVoyageRankView = class("UIVoyageRankView", require("UIViewBase"))
  24. function UIVoyageRankView:ctor()
  25. end
  26. ---@private
  27. function UIVoyageRankView:SetActive(result)
  28. self.gameObject:SetActive(result)
  29. end
  30. ---@private
  31. function UIVoyageRankView:InitGenerate(Root, data)
  32. self.transform = Root
  33. self.inited = true
  34. if self.super.Init then
  35. self.super.Init(self)
  36. end
  37. local tmp
  38. self:InitGenerate__1(Root,data)
  39. self:InitGenerate__2(Root,data)
  40. self:InitGenerate__3(Root,data)
  41. self:InitGenerate__4(Root,data)
  42. self:InitGenerate__5(Root,data)
  43. self:InitGenerate__6(Root,data)
  44. end
  45. ---@private
  46. function UIVoyageRankView:InitGenerate__1(Root, data)
  47. --[[
  48. UIAnimator/Alpha
  49. --]]
  50. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  51. if tolua.getpeer(tmp) == nil then
  52. tolua.setpeer(tmp, {})
  53. end
  54. self.AnyBtn = tmp
  55. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  56. end
  57. ---@private
  58. function UIVoyageRankView:InitGenerate__2(Root, data)
  59. --[[
  60. UIAnimator/Window/BtnClose
  61. --]]
  62. local tmp = Root:Find("UIAnimator/Window/BtnClose").gameObject
  63. if tolua.getpeer(tmp) == nil then
  64. tolua.setpeer(tmp, {})
  65. end
  66. self.btnClose = tmp
  67. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  68. end
  69. ---@private
  70. function UIVoyageRankView:InitGenerate__3(Root, data)
  71. --[[
  72. UIAnimator/Window/RankList
  73. --]]
  74. local tmp = Root:Find("UIAnimator/Window/RankList").gameObject
  75. if tolua.getpeer(tmp) == nil then
  76. tolua.setpeer(tmp, {})
  77. end
  78. self.rankList = tmp
  79. tmp.loopListView = tmp:GetComponent(Enum.TypeInfo.LoopListView)
  80. end
  81. ---@private
  82. function UIVoyageRankView:InitGenerate__4(Root, data)
  83. --[[
  84. UIAnimator/Window/RankList/Viewport/Content/LoadingItem
  85. --]]
  86. local tmp = Root:Find("UIAnimator/Window/RankList/Viewport/Content/LoadingItem").gameObject
  87. if tolua.getpeer(tmp) == nil then
  88. tolua.setpeer(tmp, {})
  89. end
  90. self.loadingItem = CommonUtil.BindGridViewItem2LuaStatic("LoadingItem", tmp)
  91. self.loadingItem.prefabName = "LoadingItem"
  92. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  93. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  94. end
  95. ---@private
  96. function UIVoyageRankView:InitGenerate__5(Root, data)
  97. --[[
  98. UIAnimator/Window/RankList/Viewport/Content/VoyageRankItem
  99. --]]
  100. local tmp = Root:Find("UIAnimator/Window/RankList/Viewport/Content/VoyageRankItem").gameObject
  101. if tolua.getpeer(tmp) == nil then
  102. tolua.setpeer(tmp, {})
  103. end
  104. self.voyageRankItem = CommonUtil.BindGridViewItem2LuaStatic("VoyageRankItem", tmp)
  105. self.voyageRankItem.prefabName = "VoyageRankItem"
  106. end
  107. ---@private
  108. function UIVoyageRankView:InitGenerate__6(Root, data)
  109. --[[
  110. UIAnimator/Window/Bottom/VoyageRankItem
  111. --]]
  112. local tmp = Root:Find("UIAnimator/Window/Bottom/VoyageRankItem").gameObject
  113. if tolua.getpeer(tmp) == nil then
  114. tolua.setpeer(tmp, {})
  115. end
  116. self.selfVoyageRankItem = CommonUtil.BindGridViewItem2LuaStatic("VoyageRankItem", tmp)
  117. self.selfVoyageRankItem.prefabName = "VoyageRankItem"
  118. end
  119. ---@private
  120. function UIVoyageRankView:GenerateDestroy()
  121. if tolua.getpeer(self.AnyBtn) ~= nil then
  122. tolua.setpeer(self.AnyBtn, nil)
  123. end
  124. self.AnyBtn = nil
  125. if tolua.getpeer(self.btnClose) ~= nil then
  126. tolua.setpeer(self.btnClose, nil)
  127. end
  128. self.btnClose = nil
  129. if tolua.getpeer(self.rankList) ~= nil then
  130. tolua.setpeer(self.rankList, nil)
  131. end
  132. self.rankList = nil
  133. if self.loadingItem.GenerateDestroy ~= nil then
  134. self.loadingItem:GenerateDestroy()
  135. end
  136. if tolua.getpeer(self.loadingItem) ~= nil then
  137. tolua.setpeer(self.loadingItem, nil)
  138. end
  139. self.loadingItem = nil
  140. if self.voyageRankItem.GenerateDestroy ~= nil then
  141. self.voyageRankItem:GenerateDestroy()
  142. end
  143. if tolua.getpeer(self.voyageRankItem) ~= nil then
  144. tolua.setpeer(self.voyageRankItem, nil)
  145. end
  146. self.voyageRankItem = nil
  147. if self.selfVoyageRankItem.GenerateDestroy ~= nil then
  148. self.selfVoyageRankItem:GenerateDestroy()
  149. end
  150. if tolua.getpeer(self.selfVoyageRankItem) ~= nil then
  151. tolua.setpeer(self.selfVoyageRankItem, nil)
  152. end
  153. self.selfVoyageRankItem = nil
  154. self.transform = nil
  155. self.gameObject = nil
  156. self.inited = false
  157. end
  158. return UIVoyageRankView