UISimpleNoticeView_Generate.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. ---@class UISimpleNotice__Generate_contentLab
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UISimpleNotice__Generate_scrollView
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public scrollRect UnityEngine.UI.ScrollRect
  7. ---@class UISimpleNotice__Generate_titleLab
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text TMPro.TextMeshProUGUI
  10. ---@class UISimpleNotice__Generate_btnClose
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UISimpleNotice__Generate_AnyBtn
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UISimpleNotice__Generate_uIAnimator
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public animator UnityEngine.Animator
  19. ---@class UISimpleNotice__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private uIAnimator UISimpleNotice__Generate_uIAnimator
  23. ---@field private AnyBtn UISimpleNotice__Generate_AnyBtn
  24. ---@field private btnClose UISimpleNotice__Generate_btnClose
  25. ---@field private titleLab UISimpleNotice__Generate_titleLab
  26. ---@field private scrollView UISimpleNotice__Generate_scrollView
  27. ---@field private contentLab UISimpleNotice__Generate_contentLab
  28. local UISimpleNoticeView = class("UISimpleNoticeView", require("UIViewBase"))
  29. function UISimpleNoticeView:ctor()
  30. end
  31. ---@private
  32. function UISimpleNoticeView:SetActive(result)
  33. self.gameObject:SetActive(result)
  34. end
  35. ---@private
  36. function UISimpleNoticeView:InitGenerate(Root, data)
  37. self.transform = Root
  38. self.inited = true
  39. if self.super.Init then
  40. self.super.Init(self)
  41. end
  42. local tmp
  43. self:InitGenerate__1(Root,data)
  44. self:InitGenerate__2(Root,data)
  45. self:InitGenerate__3(Root,data)
  46. self:InitGenerate__4(Root,data)
  47. self:InitGenerate__5(Root,data)
  48. self:InitGenerate__6(Root,data)
  49. end
  50. ---@private
  51. function UISimpleNoticeView:InitGenerate__1(Root, data)
  52. --[[
  53. UIAnimator
  54. --]]
  55. local tmp = Root:Find("UIAnimator").gameObject
  56. if tolua.getpeer(tmp) == nil then
  57. tolua.setpeer(tmp, {})
  58. end
  59. self.uIAnimator = tmp
  60. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  61. tmp.animator.logWarnings = false
  62. end
  63. ---@private
  64. function UISimpleNoticeView:InitGenerate__2(Root, data)
  65. --[[
  66. UIAnimator/Alpha
  67. --]]
  68. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  69. if tolua.getpeer(tmp) == nil then
  70. tolua.setpeer(tmp, {})
  71. end
  72. self.AnyBtn = tmp
  73. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  74. end
  75. ---@private
  76. function UISimpleNoticeView:InitGenerate__3(Root, data)
  77. --[[
  78. UIAnimator/Window/BtnClose
  79. --]]
  80. local tmp = Root:Find("UIAnimator/Window/BtnClose").gameObject
  81. if tolua.getpeer(tmp) == nil then
  82. tolua.setpeer(tmp, {})
  83. end
  84. self.btnClose = tmp
  85. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  86. end
  87. ---@private
  88. function UISimpleNoticeView:InitGenerate__4(Root, data)
  89. --[[
  90. UIAnimator/Window/TitleLab
  91. --]]
  92. local tmp = Root:Find("UIAnimator/Window/TitleLab").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.titleLab = tmp
  97. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  98. end
  99. ---@private
  100. function UISimpleNoticeView:InitGenerate__5(Root, data)
  101. --[[
  102. UIAnimator/Window/ScrollView
  103. --]]
  104. local tmp = Root:Find("UIAnimator/Window/ScrollView").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.scrollView = tmp
  109. tmp.scrollRect = tmp:GetComponent(Enum.TypeInfo.ScrollRect)
  110. end
  111. ---@private
  112. function UISimpleNoticeView:InitGenerate__6(Root, data)
  113. --[[
  114. UIAnimator/Window/ScrollView/Viewport/Content/ContentLab
  115. --]]
  116. local tmp = Root:Find("UIAnimator/Window/ScrollView/Viewport/Content/ContentLab").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.contentLab = tmp
  121. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  122. end
  123. ---@private
  124. function UISimpleNoticeView:GenerateDestroy()
  125. if tolua.getpeer(self.uIAnimator) ~= nil then
  126. tolua.setpeer(self.uIAnimator, nil)
  127. end
  128. self.uIAnimator = nil
  129. if tolua.getpeer(self.AnyBtn) ~= nil then
  130. tolua.setpeer(self.AnyBtn, nil)
  131. end
  132. self.AnyBtn = nil
  133. if tolua.getpeer(self.btnClose) ~= nil then
  134. tolua.setpeer(self.btnClose, nil)
  135. end
  136. self.btnClose = nil
  137. if tolua.getpeer(self.titleLab) ~= nil then
  138. tolua.setpeer(self.titleLab, nil)
  139. end
  140. self.titleLab = nil
  141. if tolua.getpeer(self.scrollView) ~= nil then
  142. tolua.setpeer(self.scrollView, nil)
  143. end
  144. self.scrollView = nil
  145. if tolua.getpeer(self.contentLab) ~= nil then
  146. tolua.setpeer(self.contentLab, nil)
  147. end
  148. self.contentLab = nil
  149. self.transform = nil
  150. self.gameObject = nil
  151. self.inited = false
  152. end
  153. return UISimpleNoticeView