UIIdolRankItem_Generate.lua 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. ---@class UIIdolRankItem__Generate_btnSupport
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UIIdolRankItem__Generate_hotVal
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class UIIdolRankItem__Generate_playerName
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class UIIdolRankItem__Generate_vipIcon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class UIIdolRankItem__Generate_headItem
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public layoutElement UnityEngine.UI.LayoutElement
  16. ---@class UIIdolRankItem__Generate_madel03
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public image UnityEngine.UI.Image
  19. ---@class UIIdolRankItem__Generate_madel02
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public image UnityEngine.UI.Image
  22. ---@class UIIdolRankItem__Generate_madel01
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public image UnityEngine.UI.Image
  25. ---@class UIIdolRankItem__Generate_rank
  26. ---@field public gameObject UnityEngine.GameObject
  27. ---@field public text UnityEngine.UI.Text
  28. ---@class UIIdolRankItem__Generate
  29. ---@field private gameObject UnityEngine.GameObject
  30. ---@field private transform UnityEngine.Transform
  31. ---@field private rank UIIdolRankItem__Generate_rank
  32. ---@field private madel01 UIIdolRankItem__Generate_madel01
  33. ---@field private madel02 UIIdolRankItem__Generate_madel02
  34. ---@field private madel03 UIIdolRankItem__Generate_madel03
  35. ---@field private headItem UIIdolRankItem__Generate_headItem
  36. ---@field private vipIcon UIIdolRankItem__Generate_vipIcon
  37. ---@field private playerName UIIdolRankItem__Generate_playerName
  38. ---@field private hotVal UIIdolRankItem__Generate_hotVal
  39. ---@field private btnSupport UIIdolRankItem__Generate_btnSupport
  40. local UIIdolRankItemView = class("UIIdolRankItemView")
  41. function UIIdolRankItemView:ctor()
  42. end
  43. ---@private
  44. function UIIdolRankItemView:SetActive(result)
  45. self.gameObject:SetActive(result)
  46. end
  47. ---@private
  48. function UIIdolRankItemView:InitGenerate(Root, data)
  49. self.transform = Root
  50. self.inited = true
  51. local tmp
  52. self:InitGenerate__1(Root,data)
  53. self:InitGenerate__2(Root,data)
  54. self:InitGenerate__3(Root,data)
  55. self:InitGenerate__4(Root,data)
  56. self:InitGenerate__5(Root,data)
  57. self:InitGenerate__6(Root,data)
  58. self:InitGenerate__7(Root,data)
  59. self:InitGenerate__8(Root,data)
  60. self:InitGenerate__9(Root,data)
  61. self:InitGenerate__10(Root,data)
  62. end
  63. ---@private
  64. function UIIdolRankItemView:InitGenerate__1(Root, data)
  65. --[[
  66. Root
  67. --]]
  68. end
  69. ---@private
  70. function UIIdolRankItemView:InitGenerate__2(Root, data)
  71. --[[
  72. Rank
  73. --]]
  74. local tmp = Root:Find("Rank").gameObject
  75. if tolua.getpeer(tmp) == nil then
  76. tolua.setpeer(tmp, {})
  77. end
  78. self.rank = tmp
  79. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  80. end
  81. ---@private
  82. function UIIdolRankItemView:InitGenerate__3(Root, data)
  83. --[[
  84. Madel01
  85. --]]
  86. local tmp = Root:Find("Madel01").gameObject
  87. if tolua.getpeer(tmp) == nil then
  88. tolua.setpeer(tmp, {})
  89. end
  90. self.madel01 = tmp
  91. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  92. end
  93. ---@private
  94. function UIIdolRankItemView:InitGenerate__4(Root, data)
  95. --[[
  96. Madel02
  97. --]]
  98. local tmp = Root:Find("Madel02").gameObject
  99. if tolua.getpeer(tmp) == nil then
  100. tolua.setpeer(tmp, {})
  101. end
  102. self.madel02 = tmp
  103. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  104. end
  105. ---@private
  106. function UIIdolRankItemView:InitGenerate__5(Root, data)
  107. --[[
  108. Madel03
  109. --]]
  110. local tmp = Root:Find("Madel03").gameObject
  111. if tolua.getpeer(tmp) == nil then
  112. tolua.setpeer(tmp, {})
  113. end
  114. self.madel03 = tmp
  115. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  116. end
  117. ---@private
  118. function UIIdolRankItemView:InitGenerate__6(Root, data)
  119. --[[
  120. PlayerNode/HeadBox/HeadItem
  121. --]]
  122. local tmp = Root:Find("PlayerNode/HeadBox/HeadItem").gameObject
  123. if tolua.getpeer(tmp) == nil then
  124. tolua.setpeer(tmp, {})
  125. end
  126. self.headItem = CommonUtil.BindGridViewItem2LuaStatic("HeadItem", tmp)
  127. self.headItem.prefabName = "HeadItem"
  128. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  129. end
  130. ---@private
  131. function UIIdolRankItemView:InitGenerate__7(Root, data)
  132. --[[
  133. PlayerNode/VipIcon
  134. --]]
  135. local tmp = Root:Find("PlayerNode/VipIcon").gameObject
  136. if tolua.getpeer(tmp) == nil then
  137. tolua.setpeer(tmp, {})
  138. end
  139. self.vipIcon = tmp
  140. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  141. end
  142. ---@private
  143. function UIIdolRankItemView:InitGenerate__8(Root, data)
  144. --[[
  145. PlayerNode/NameText
  146. --]]
  147. local tmp = Root:Find("PlayerNode/NameText").gameObject
  148. if tolua.getpeer(tmp) == nil then
  149. tolua.setpeer(tmp, {})
  150. end
  151. self.playerName = tmp
  152. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  153. end
  154. ---@private
  155. function UIIdolRankItemView:InitGenerate__9(Root, data)
  156. --[[
  157. PlayerNode/HotVal
  158. --]]
  159. local tmp = Root:Find("PlayerNode/HotVal").gameObject
  160. if tolua.getpeer(tmp) == nil then
  161. tolua.setpeer(tmp, {})
  162. end
  163. self.hotVal = tmp
  164. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  165. end
  166. ---@private
  167. function UIIdolRankItemView:InitGenerate__10(Root, data)
  168. --[[
  169. BtnSupport
  170. --]]
  171. local tmp = Root:Find("BtnSupport").gameObject
  172. if tolua.getpeer(tmp) == nil then
  173. tolua.setpeer(tmp, {})
  174. end
  175. self.btnSupport = tmp
  176. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  177. end
  178. ---@private
  179. function UIIdolRankItemView:GenerateDestroy()
  180. if tolua.getpeer(self.btnSupport) ~= nil then
  181. tolua.setpeer(self.btnSupport, nil)
  182. end
  183. if tolua.getpeer(self.hotVal) ~= nil then
  184. tolua.setpeer(self.hotVal, nil)
  185. end
  186. if tolua.getpeer(self.playerName) ~= nil then
  187. tolua.setpeer(self.playerName, nil)
  188. end
  189. if tolua.getpeer(self.vipIcon) ~= nil then
  190. tolua.setpeer(self.vipIcon, nil)
  191. end
  192. if self.headItem.GenerateDestroy ~= nil then
  193. self.headItem:GenerateDestroy()
  194. end
  195. if tolua.getpeer(self.headItem) ~= nil then
  196. tolua.setpeer(self.headItem, nil)
  197. end
  198. if tolua.getpeer(self.madel03) ~= nil then
  199. tolua.setpeer(self.madel03, nil)
  200. end
  201. if tolua.getpeer(self.madel02) ~= nil then
  202. tolua.setpeer(self.madel02, nil)
  203. end
  204. if tolua.getpeer(self.madel01) ~= nil then
  205. tolua.setpeer(self.madel01, nil)
  206. end
  207. if tolua.getpeer(self.rank) ~= nil then
  208. tolua.setpeer(self.rank, nil)
  209. end
  210. self.transform = nil
  211. self.gameObject = nil
  212. self.inited = false
  213. end
  214. return UIIdolRankItemView