UIExpeditionRankView_Generate.lua 5.6 KB

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