AllServerGroupItem_Generate.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ---@class AllServerGroupItem__Generate_serverGroupName
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class AllServerGroupItem__Generate_bGColor
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class AllServerGroupItem__Generate
  8. ---@field private gameObject UnityEngine.GameObject
  9. ---@field private transform UnityEngine.Transform
  10. ---@field private button UnityEngine.UI.Button
  11. ---@field private bGColor AllServerGroupItem__Generate_bGColor
  12. ---@field private allChosenTagImage UnityEngine.GameObject
  13. ---@field private line UnityEngine.GameObject
  14. ---@field private serverGroupName AllServerGroupItem__Generate_serverGroupName
  15. local AllServerGroupItemView = class("AllServerGroupItemView")
  16. function AllServerGroupItemView:ctor()
  17. end
  18. ---@private
  19. function AllServerGroupItemView:SetActive(result)
  20. self.gameObject:SetActive(result)
  21. end
  22. ---@private
  23. function AllServerGroupItemView:InitGenerate(Root, data)
  24. self.transform = Root
  25. self.inited = true
  26. local tmp
  27. self:InitGenerate__1(Root,data)
  28. self:InitGenerate__2(Root,data)
  29. self:InitGenerate__3(Root,data)
  30. self:InitGenerate__4(Root,data)
  31. self:InitGenerate__5(Root,data)
  32. end
  33. ---@private
  34. function AllServerGroupItemView:InitGenerate__1(Root, data)
  35. --[[
  36. Root
  37. --]]
  38. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  39. end
  40. ---@private
  41. function AllServerGroupItemView:InitGenerate__2(Root, data)
  42. --[[
  43. BGColor
  44. --]]
  45. local tmp = Root:Find("BGColor").gameObject
  46. if tolua.getpeer(tmp) == nil then
  47. tolua.setpeer(tmp, {})
  48. end
  49. self.bGColor = tmp
  50. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  51. end
  52. ---@private
  53. function AllServerGroupItemView:InitGenerate__3(Root, data)
  54. --[[
  55. AllChosenTagImage
  56. --]]
  57. local tmp = Root:Find("AllChosenTagImage").gameObject
  58. if tolua.getpeer(tmp) == nil then
  59. tolua.setpeer(tmp, {})
  60. end
  61. self.allChosenTagImage = tmp
  62. end
  63. ---@private
  64. function AllServerGroupItemView:InitGenerate__4(Root, data)
  65. --[[
  66. AllChosenTagImage/Line
  67. --]]
  68. local tmp = Root:Find("AllChosenTagImage/Line").gameObject
  69. if tolua.getpeer(tmp) == nil then
  70. tolua.setpeer(tmp, {})
  71. end
  72. self.line = tmp
  73. end
  74. ---@private
  75. function AllServerGroupItemView:InitGenerate__5(Root, data)
  76. --[[
  77. ServerGroupName
  78. --]]
  79. local tmp = Root:Find("ServerGroupName").gameObject
  80. if tolua.getpeer(tmp) == nil then
  81. tolua.setpeer(tmp, {})
  82. end
  83. self.serverGroupName = tmp
  84. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  85. end
  86. ---@private
  87. function AllServerGroupItemView:GenerateDestroy()
  88. if tolua.getpeer(self.bGColor) ~= nil then
  89. tolua.setpeer(self.bGColor, nil)
  90. end
  91. self.bGColor = nil
  92. if tolua.getpeer(self.allChosenTagImage) ~= nil then
  93. tolua.setpeer(self.allChosenTagImage, nil)
  94. end
  95. self.allChosenTagImage = nil
  96. if tolua.getpeer(self.line) ~= nil then
  97. tolua.setpeer(self.line, nil)
  98. end
  99. self.line = nil
  100. if tolua.getpeer(self.serverGroupName) ~= nil then
  101. tolua.setpeer(self.serverGroupName, nil)
  102. end
  103. self.serverGroupName = nil
  104. self.transform = nil
  105. self.gameObject = nil
  106. self.inited = false
  107. end
  108. return AllServerGroupItemView