FriendItemList_Generate.lua 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. ---@class FriendItemList__Generate_headItem
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public layoutElement UnityEngine.UI.LayoutElement
  4. ---@class FriendItemList__Generate_statusLbl
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class FriendItemList__Generate_fightPower
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class FriendItemList__Generate_playerName
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text UnityEngine.UI.Text
  13. ---@class FriendItemList__Generate_playerFollow
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@field public switchSprite SwitchSprite
  17. ---@class FriendItemList__Generate_statusImg
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public image UnityEngine.UI.Image
  20. ---@class FriendItemList__Generate_clapBtn
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public button UnityEngine.UI.Button
  23. ---@class FriendItemList__Generate_chatBtn
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public button UnityEngine.UI.Button
  26. ---@class FriendItemList__Generate_removeBlackBtn
  27. ---@field public gameObject UnityEngine.GameObject
  28. ---@field public button UnityEngine.UI.Button
  29. ---@class FriendItemList__Generate_unfollowBtn
  30. ---@field public gameObject UnityEngine.GameObject
  31. ---@field public button UnityEngine.UI.Button
  32. ---@class FriendItemList__Generate_followBtn
  33. ---@field public gameObject UnityEngine.GameObject
  34. ---@field public button UnityEngine.UI.Button
  35. ---@class FriendItemList__Generate
  36. ---@field private gameObject UnityEngine.GameObject
  37. ---@field private transform UnityEngine.Transform
  38. ---@field private btnsGroup UnityEngine.GameObject
  39. ---@field private followBtn FriendItemList__Generate_followBtn
  40. ---@field private unfollowBtn FriendItemList__Generate_unfollowBtn
  41. ---@field private removeBlackBtn FriendItemList__Generate_removeBlackBtn
  42. ---@field private chatBtn FriendItemList__Generate_chatBtn
  43. ---@field private recruitBtnsGroup UnityEngine.GameObject
  44. ---@field private clapBtn FriendItemList__Generate_clapBtn
  45. ---@field private graduate UnityEngine.GameObject
  46. ---@field private statusImg FriendItemList__Generate_statusImg
  47. ---@field private playerFollow FriendItemList__Generate_playerFollow
  48. ---@field private playerName FriendItemList__Generate_playerName
  49. ---@field private fightPower FriendItemList__Generate_fightPower
  50. ---@field private statusLbl FriendItemList__Generate_statusLbl
  51. ---@field private headItem FriendItemList__Generate_headItem
  52. ---@field private redPoint UnityEngine.GameObject
  53. local FriendItemListView = class("FriendItemListView")
  54. function FriendItemListView:ctor()
  55. end
  56. ---@private
  57. function FriendItemListView:SetActive(result)
  58. self.gameObject:SetActive(result)
  59. end
  60. ---@private
  61. function FriendItemListView:InitGenerate(Root, data)
  62. self.transform = Root
  63. self.inited = true
  64. local tmp
  65. self:InitGenerate__1(Root,data)
  66. self:InitGenerate__2(Root,data)
  67. self:InitGenerate__3(Root,data)
  68. self:InitGenerate__4(Root,data)
  69. self:InitGenerate__5(Root,data)
  70. self:InitGenerate__6(Root,data)
  71. self:InitGenerate__7(Root,data)
  72. self:InitGenerate__8(Root,data)
  73. self:InitGenerate__9(Root,data)
  74. self:InitGenerate__10(Root,data)
  75. self:InitGenerate__11(Root,data)
  76. self:InitGenerate__12(Root,data)
  77. self:InitGenerate__13(Root,data)
  78. self:InitGenerate__14(Root,data)
  79. self:InitGenerate__15(Root,data)
  80. end
  81. ---@private
  82. function FriendItemListView:InitGenerate__1(Root, data)
  83. --[[
  84. BtnsGroup
  85. --]]
  86. local tmp = Root:Find("BtnsGroup").gameObject
  87. if tolua.getpeer(tmp) == nil then
  88. tolua.setpeer(tmp, {})
  89. end
  90. self.btnsGroup = tmp
  91. end
  92. ---@private
  93. function FriendItemListView:InitGenerate__2(Root, data)
  94. --[[
  95. BtnsGroup/FollowBtn
  96. --]]
  97. local tmp = Root:Find("BtnsGroup/FollowBtn").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.followBtn = tmp
  102. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  103. end
  104. ---@private
  105. function FriendItemListView:InitGenerate__3(Root, data)
  106. --[[
  107. BtnsGroup/UnfollowBtn
  108. --]]
  109. local tmp = Root:Find("BtnsGroup/UnfollowBtn").gameObject
  110. if tolua.getpeer(tmp) == nil then
  111. tolua.setpeer(tmp, {})
  112. end
  113. self.unfollowBtn = tmp
  114. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  115. end
  116. ---@private
  117. function FriendItemListView:InitGenerate__4(Root, data)
  118. --[[
  119. BtnsGroup/RemoveBlackBtn
  120. --]]
  121. local tmp = Root:Find("BtnsGroup/RemoveBlackBtn").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.removeBlackBtn = tmp
  126. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  127. end
  128. ---@private
  129. function FriendItemListView:InitGenerate__5(Root, data)
  130. --[[
  131. BtnsGroup/ChatBtn
  132. --]]
  133. local tmp = Root:Find("BtnsGroup/ChatBtn").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.chatBtn = tmp
  138. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  139. end
  140. ---@private
  141. function FriendItemListView:InitGenerate__6(Root, data)
  142. --[[
  143. RecruitBtnsGroup
  144. --]]
  145. local tmp = Root:Find("RecruitBtnsGroup").gameObject
  146. if tolua.getpeer(tmp) == nil then
  147. tolua.setpeer(tmp, {})
  148. end
  149. self.recruitBtnsGroup = tmp
  150. end
  151. ---@private
  152. function FriendItemListView:InitGenerate__7(Root, data)
  153. --[[
  154. RecruitBtnsGroup/ClapBtn
  155. --]]
  156. local tmp = Root:Find("RecruitBtnsGroup/ClapBtn").gameObject
  157. if tolua.getpeer(tmp) == nil then
  158. tolua.setpeer(tmp, {})
  159. end
  160. self.clapBtn = tmp
  161. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  162. end
  163. ---@private
  164. function FriendItemListView:InitGenerate__8(Root, data)
  165. --[[
  166. RecruitBtnsGroup/Graduate
  167. --]]
  168. local tmp = Root:Find("RecruitBtnsGroup/Graduate").gameObject
  169. if tolua.getpeer(tmp) == nil then
  170. tolua.setpeer(tmp, {})
  171. end
  172. self.graduate = tmp
  173. end
  174. ---@private
  175. function FriendItemListView:InitGenerate__9(Root, data)
  176. --[[
  177. StatusImg
  178. --]]
  179. local tmp = Root:Find("StatusImg").gameObject
  180. if tolua.getpeer(tmp) == nil then
  181. tolua.setpeer(tmp, {})
  182. end
  183. self.statusImg = tmp
  184. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  185. end
  186. ---@private
  187. function FriendItemListView:InitGenerate__10(Root, data)
  188. --[[
  189. NameGroup/FollowImg
  190. --]]
  191. local tmp = Root:Find("NameGroup/FollowImg").gameObject
  192. if tolua.getpeer(tmp) == nil then
  193. tolua.setpeer(tmp, {})
  194. end
  195. self.playerFollow = tmp
  196. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  197. tmp.switchSprite = tmp:GetComponent(Enum.TypeInfo.SwitchSprite)
  198. end
  199. ---@private
  200. function FriendItemListView:InitGenerate__11(Root, data)
  201. --[[
  202. NameGroup/Name
  203. --]]
  204. local tmp = Root:Find("NameGroup/Name").gameObject
  205. if tolua.getpeer(tmp) == nil then
  206. tolua.setpeer(tmp, {})
  207. end
  208. self.playerName = tmp
  209. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  210. end
  211. ---@private
  212. function FriendItemListView:InitGenerate__12(Root, data)
  213. --[[
  214. FightPowerNum
  215. --]]
  216. local tmp = Root:Find("FightPowerNum").gameObject
  217. if tolua.getpeer(tmp) == nil then
  218. tolua.setpeer(tmp, {})
  219. end
  220. self.fightPower = tmp
  221. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  222. end
  223. ---@private
  224. function FriendItemListView:InitGenerate__13(Root, data)
  225. --[[
  226. StatusLbl
  227. --]]
  228. local tmp = Root:Find("StatusLbl").gameObject
  229. if tolua.getpeer(tmp) == nil then
  230. tolua.setpeer(tmp, {})
  231. end
  232. self.statusLbl = tmp
  233. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  234. end
  235. ---@private
  236. function FriendItemListView:InitGenerate__14(Root, data)
  237. --[[
  238. HeadItem
  239. --]]
  240. local tmp = Root:Find("HeadItem").gameObject
  241. if tolua.getpeer(tmp) == nil then
  242. tolua.setpeer(tmp, {})
  243. end
  244. self.headItem = CommonUtil.BindGridViewItem2LuaStatic("HeadItem", tmp)
  245. self.headItem.prefabName = "HeadItem"
  246. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  247. end
  248. ---@private
  249. function FriendItemListView:InitGenerate__15(Root, data)
  250. --[[
  251. UINewRP
  252. --]]
  253. local tmp = Root:Find("UINewRP").gameObject
  254. if tolua.getpeer(tmp) == nil then
  255. tolua.setpeer(tmp, {})
  256. end
  257. self.redPoint = tmp
  258. end
  259. ---@private
  260. function FriendItemListView:GenerateDestroy()
  261. if tolua.getpeer(self.btnsGroup) ~= nil then
  262. tolua.setpeer(self.btnsGroup, nil)
  263. end
  264. self.btnsGroup = nil
  265. if tolua.getpeer(self.followBtn) ~= nil then
  266. tolua.setpeer(self.followBtn, nil)
  267. end
  268. self.followBtn = nil
  269. if tolua.getpeer(self.unfollowBtn) ~= nil then
  270. tolua.setpeer(self.unfollowBtn, nil)
  271. end
  272. self.unfollowBtn = nil
  273. if tolua.getpeer(self.removeBlackBtn) ~= nil then
  274. tolua.setpeer(self.removeBlackBtn, nil)
  275. end
  276. self.removeBlackBtn = nil
  277. if tolua.getpeer(self.chatBtn) ~= nil then
  278. tolua.setpeer(self.chatBtn, nil)
  279. end
  280. self.chatBtn = nil
  281. if tolua.getpeer(self.recruitBtnsGroup) ~= nil then
  282. tolua.setpeer(self.recruitBtnsGroup, nil)
  283. end
  284. self.recruitBtnsGroup = nil
  285. if tolua.getpeer(self.clapBtn) ~= nil then
  286. tolua.setpeer(self.clapBtn, nil)
  287. end
  288. self.clapBtn = nil
  289. if tolua.getpeer(self.graduate) ~= nil then
  290. tolua.setpeer(self.graduate, nil)
  291. end
  292. self.graduate = nil
  293. if tolua.getpeer(self.statusImg) ~= nil then
  294. tolua.setpeer(self.statusImg, nil)
  295. end
  296. self.statusImg = nil
  297. if tolua.getpeer(self.playerFollow) ~= nil then
  298. tolua.setpeer(self.playerFollow, nil)
  299. end
  300. self.playerFollow = nil
  301. if tolua.getpeer(self.playerName) ~= nil then
  302. tolua.setpeer(self.playerName, nil)
  303. end
  304. self.playerName = nil
  305. if tolua.getpeer(self.fightPower) ~= nil then
  306. tolua.setpeer(self.fightPower, nil)
  307. end
  308. self.fightPower = nil
  309. if tolua.getpeer(self.statusLbl) ~= nil then
  310. tolua.setpeer(self.statusLbl, nil)
  311. end
  312. self.statusLbl = nil
  313. if self.headItem.GenerateDestroy ~= nil then
  314. self.headItem:GenerateDestroy()
  315. end
  316. if tolua.getpeer(self.headItem) ~= nil then
  317. tolua.setpeer(self.headItem, nil)
  318. end
  319. self.headItem = nil
  320. if tolua.getpeer(self.redPoint) ~= nil then
  321. tolua.setpeer(self.redPoint, nil)
  322. end
  323. self.redPoint = nil
  324. self.transform = nil
  325. self.gameObject = nil
  326. self.inited = false
  327. end
  328. return FriendItemListView