ChatTextItem_Generate.lua 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. ---@class ChatTextItem__Generate_text
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public rectTransform UnityEngine.RectTransform
  4. ---@field public contentSizeFitter UnityEngine.UI.ContentSizeFitter
  5. ---@field public symbolText WXB.SymbolText
  6. ---@field public symbolTextEvent WXB.SymbolTextEvent
  7. ---@class ChatTextItem__Generate_titleImg
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class ChatTextItem__Generate_vipIcon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class ChatTextItem__Generate_nickname
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public text UnityEngine.UI.Text
  16. ---@class ChatTextItem__Generate_nameBg
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public button UnityEngine.UI.Button
  19. ---@class ChatTextItem__Generate_headImage
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public image UnityEngine.UI.Image
  22. ---@class ChatTextItem__Generate_player
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public button UnityEngine.UI.Button
  25. ---@class ChatTextItem__Generate
  26. ---@field private gameObject UnityEngine.GameObject
  27. ---@field private transform UnityEngine.Transform
  28. ---@field private rectTransform UnityEngine.RectTransform
  29. ---@field private layoutElement UnityEngine.UI.LayoutElement
  30. ---@field private system UnityEngine.GameObject
  31. ---@field private player ChatTextItem__Generate_player
  32. ---@field private headImage ChatTextItem__Generate_headImage
  33. ---@field private easyPlayer UnityEngine.GameObject
  34. ---@field private nameBg ChatTextItem__Generate_nameBg
  35. ---@field private nickname ChatTextItem__Generate_nickname
  36. ---@field private vipIcon ChatTextItem__Generate_vipIcon
  37. ---@field private titleImg ChatTextItem__Generate_titleImg
  38. ---@field private chlWorld UnityEngine.GameObject
  39. ---@field private chlSystem UnityEngine.GameObject
  40. ---@field private chlGuildSystem UnityEngine.GameObject
  41. ---@field private text ChatTextItem__Generate_text
  42. local ChatTextItemView = class("ChatTextItemView")
  43. function ChatTextItemView:ctor()
  44. end
  45. ---@private
  46. function ChatTextItemView:SetActive(result)
  47. self.gameObject:SetActive(result)
  48. end
  49. ---@private
  50. function ChatTextItemView:InitGenerate(Root, data)
  51. self.transform = Root
  52. self.inited = true
  53. local tmp
  54. self:InitGenerate__1(Root,data)
  55. self:InitGenerate__2(Root,data)
  56. self:InitGenerate__3(Root,data)
  57. self:InitGenerate__4(Root,data)
  58. self:InitGenerate__5(Root,data)
  59. self:InitGenerate__6(Root,data)
  60. self:InitGenerate__7(Root,data)
  61. self:InitGenerate__8(Root,data)
  62. self:InitGenerate__9(Root,data)
  63. self:InitGenerate__10(Root,data)
  64. self:InitGenerate__11(Root,data)
  65. self:InitGenerate__12(Root,data)
  66. self:InitGenerate__13(Root,data)
  67. end
  68. ---@private
  69. function ChatTextItemView:InitGenerate__1(Root, data)
  70. --[[
  71. Root
  72. --]]
  73. self.rectTransform = Root:GetComponent(Enum.TypeInfo.RectTransform)
  74. self.layoutElement = Root:GetComponent(Enum.TypeInfo.LayoutElement)
  75. end
  76. ---@private
  77. function ChatTextItemView:InitGenerate__2(Root, data)
  78. --[[
  79. System
  80. --]]
  81. local tmp = Root:Find("System").gameObject
  82. if tolua.getpeer(tmp) == nil then
  83. tolua.setpeer(tmp, {})
  84. end
  85. self.system = tmp
  86. end
  87. ---@private
  88. function ChatTextItemView:InitGenerate__3(Root, data)
  89. --[[
  90. Player
  91. --]]
  92. local tmp = Root:Find("Player").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.player = tmp
  97. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  98. end
  99. ---@private
  100. function ChatTextItemView:InitGenerate__4(Root, data)
  101. --[[
  102. Player/HeadImage
  103. --]]
  104. local tmp = Root:Find("Player/HeadImage").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.headImage = tmp
  109. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  110. end
  111. ---@private
  112. function ChatTextItemView:InitGenerate__5(Root, data)
  113. --[[
  114. EasyPlayer
  115. --]]
  116. local tmp = Root:Find("EasyPlayer").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.easyPlayer = tmp
  121. end
  122. ---@private
  123. function ChatTextItemView:InitGenerate__6(Root, data)
  124. --[[
  125. EasyPlayer/NameBg
  126. --]]
  127. local tmp = Root:Find("EasyPlayer/NameBg").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.nameBg = tmp
  132. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  133. end
  134. ---@private
  135. function ChatTextItemView:InitGenerate__7(Root, data)
  136. --[[
  137. EasyPlayer/NameBg/Nickname
  138. --]]
  139. local tmp = Root:Find("EasyPlayer/NameBg/Nickname").gameObject
  140. if tolua.getpeer(tmp) == nil then
  141. tolua.setpeer(tmp, {})
  142. end
  143. self.nickname = tmp
  144. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  145. end
  146. ---@private
  147. function ChatTextItemView:InitGenerate__8(Root, data)
  148. --[[
  149. EasyPlayer/VipIcon
  150. --]]
  151. local tmp = Root:Find("EasyPlayer/VipIcon").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.vipIcon = tmp
  156. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  157. end
  158. ---@private
  159. function ChatTextItemView:InitGenerate__9(Root, data)
  160. --[[
  161. EasyPlayer/TitleImg
  162. --]]
  163. local tmp = Root:Find("EasyPlayer/TitleImg").gameObject
  164. if tolua.getpeer(tmp) == nil then
  165. tolua.setpeer(tmp, {})
  166. end
  167. self.titleImg = tmp
  168. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  169. end
  170. ---@private
  171. function ChatTextItemView:InitGenerate__10(Root, data)
  172. --[[
  173. Channel/ChlWorld
  174. --]]
  175. local tmp = Root:Find("Channel/ChlWorld").gameObject
  176. if tolua.getpeer(tmp) == nil then
  177. tolua.setpeer(tmp, {})
  178. end
  179. self.chlWorld = tmp
  180. end
  181. ---@private
  182. function ChatTextItemView:InitGenerate__11(Root, data)
  183. --[[
  184. Channel/ChlSystem
  185. --]]
  186. local tmp = Root:Find("Channel/ChlSystem").gameObject
  187. if tolua.getpeer(tmp) == nil then
  188. tolua.setpeer(tmp, {})
  189. end
  190. self.chlSystem = tmp
  191. end
  192. ---@private
  193. function ChatTextItemView:InitGenerate__12(Root, data)
  194. --[[
  195. Channel/ChlGuildSystem
  196. --]]
  197. local tmp = Root:Find("Channel/ChlGuildSystem").gameObject
  198. if tolua.getpeer(tmp) == nil then
  199. tolua.setpeer(tmp, {})
  200. end
  201. self.chlGuildSystem = tmp
  202. end
  203. ---@private
  204. function ChatTextItemView:InitGenerate__13(Root, data)
  205. --[[
  206. Text
  207. --]]
  208. local tmp = Root:Find("Text").gameObject
  209. if tolua.getpeer(tmp) == nil then
  210. tolua.setpeer(tmp, {})
  211. end
  212. self.text = tmp
  213. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  214. tmp.contentSizeFitter = tmp:GetComponent(Enum.TypeInfo.ContentSizeFitter)
  215. tmp.symbolText = tmp:GetComponent(Enum.TypeInfo.SymbolText)
  216. tmp.symbolTextEvent = tmp:GetComponent(Enum.TypeInfo.SymbolTextEvent)
  217. end
  218. ---@private
  219. function ChatTextItemView:GenerateDestroy()
  220. if tolua.getpeer(self.system) ~= nil then
  221. tolua.setpeer(self.system, nil)
  222. end
  223. self.system = nil
  224. if tolua.getpeer(self.player) ~= nil then
  225. tolua.setpeer(self.player, nil)
  226. end
  227. self.player = nil
  228. if tolua.getpeer(self.headImage) ~= nil then
  229. tolua.setpeer(self.headImage, nil)
  230. end
  231. self.headImage = nil
  232. if tolua.getpeer(self.easyPlayer) ~= nil then
  233. tolua.setpeer(self.easyPlayer, nil)
  234. end
  235. self.easyPlayer = nil
  236. if tolua.getpeer(self.nameBg) ~= nil then
  237. tolua.setpeer(self.nameBg, nil)
  238. end
  239. self.nameBg = nil
  240. if tolua.getpeer(self.nickname) ~= nil then
  241. tolua.setpeer(self.nickname, nil)
  242. end
  243. self.nickname = nil
  244. if tolua.getpeer(self.vipIcon) ~= nil then
  245. tolua.setpeer(self.vipIcon, nil)
  246. end
  247. self.vipIcon = nil
  248. if tolua.getpeer(self.titleImg) ~= nil then
  249. tolua.setpeer(self.titleImg, nil)
  250. end
  251. self.titleImg = nil
  252. if tolua.getpeer(self.chlWorld) ~= nil then
  253. tolua.setpeer(self.chlWorld, nil)
  254. end
  255. self.chlWorld = nil
  256. if tolua.getpeer(self.chlSystem) ~= nil then
  257. tolua.setpeer(self.chlSystem, nil)
  258. end
  259. self.chlSystem = nil
  260. if tolua.getpeer(self.chlGuildSystem) ~= nil then
  261. tolua.setpeer(self.chlGuildSystem, nil)
  262. end
  263. self.chlGuildSystem = nil
  264. if tolua.getpeer(self.text) ~= nil then
  265. tolua.setpeer(self.text, nil)
  266. end
  267. self.text = nil
  268. self.transform = nil
  269. self.gameObject = nil
  270. self.inited = false
  271. end
  272. return ChatTextItemView