UIForgePopView_Generate.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. ---@class UIForgePop__Generate_text
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UIForgePop__Generate_btnCompose
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIForgePop__Generate_btnClose
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UIForgePop__Generate_content
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public gridLayoutGroup UnityEngine.UI.GridLayoutGroup
  13. ---@class UIForgePop__Generate_scrollView
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  16. ---@class UIForgePop__Generate_window
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public animator UnityEngine.Animator
  19. ---@class UIForgePop__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private window UIForgePop__Generate_window
  23. ---@field private scrollView UIForgePop__Generate_scrollView
  24. ---@field private content UIForgePop__Generate_content
  25. ---@field private btnClose UIForgePop__Generate_btnClose
  26. ---@field private btnCompose UIForgePop__Generate_btnCompose
  27. ---@field private text UIForgePop__Generate_text
  28. local UIForgePopView = class("UIForgePopView", require("UIViewBase"))
  29. function UIForgePopView:ctor()
  30. end
  31. ---@private
  32. function UIForgePopView:SetActive(result)
  33. self.gameObject:SetActive(result)
  34. end
  35. ---@private
  36. function UIForgePopView: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. self:InitGenerate__7(Root,data)
  50. end
  51. ---@private
  52. function UIForgePopView:InitGenerate__1(Root, data)
  53. --[[
  54. Root
  55. --]]
  56. end
  57. ---@private
  58. function UIForgePopView:InitGenerate__2(Root, data)
  59. --[[
  60. Window
  61. --]]
  62. local tmp = Root:Find("Window").gameObject
  63. if tolua.getpeer(tmp) == nil then
  64. tolua.setpeer(tmp, {})
  65. end
  66. self.window = tmp
  67. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  68. tmp.animator.logWarnings = false
  69. end
  70. ---@private
  71. function UIForgePopView:InitGenerate__3(Root, data)
  72. --[[
  73. Window/Scroll View
  74. --]]
  75. local tmp = Root:Find("Window/Scroll View").gameObject
  76. if tolua.getpeer(tmp) == nil then
  77. tolua.setpeer(tmp, {})
  78. end
  79. self.scrollView = tmp
  80. tmp.loopVerticalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  81. end
  82. ---@private
  83. function UIForgePopView:InitGenerate__4(Root, data)
  84. --[[
  85. Window/Scroll View/Viewport/Content
  86. --]]
  87. local tmp = Root:Find("Window/Scroll View/Viewport/Content").gameObject
  88. if tolua.getpeer(tmp) == nil then
  89. tolua.setpeer(tmp, {})
  90. end
  91. self.content = tmp
  92. tmp.gridLayoutGroup = tmp:GetComponent(Enum.TypeInfo.GridLayoutGroup)
  93. end
  94. ---@private
  95. function UIForgePopView:InitGenerate__5(Root, data)
  96. --[[
  97. Window/BtnClose
  98. --]]
  99. local tmp = Root:Find("Window/BtnClose").gameObject
  100. if tolua.getpeer(tmp) == nil then
  101. tolua.setpeer(tmp, {})
  102. end
  103. self.btnClose = tmp
  104. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  105. end
  106. ---@private
  107. function UIForgePopView:InitGenerate__6(Root, data)
  108. --[[
  109. Window/BtnCompose
  110. --]]
  111. local tmp = Root:Find("Window/BtnCompose").gameObject
  112. if tolua.getpeer(tmp) == nil then
  113. tolua.setpeer(tmp, {})
  114. end
  115. self.btnCompose = tmp
  116. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  117. end
  118. ---@private
  119. function UIForgePopView:InitGenerate__7(Root, data)
  120. --[[
  121. Window/BtnCompose/Content/Cost/Text
  122. --]]
  123. local tmp = Root:Find("Window/BtnCompose/Content/Cost/Text").gameObject
  124. if tolua.getpeer(tmp) == nil then
  125. tolua.setpeer(tmp, {})
  126. end
  127. self.text = tmp
  128. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  129. end
  130. ---@private
  131. function UIForgePopView:GenerateDestroy()
  132. if tolua.getpeer(self.window) ~= nil then
  133. tolua.setpeer(self.window, nil)
  134. end
  135. self.window = nil
  136. if tolua.getpeer(self.scrollView) ~= nil then
  137. tolua.setpeer(self.scrollView, nil)
  138. end
  139. self.scrollView = nil
  140. if tolua.getpeer(self.content) ~= nil then
  141. tolua.setpeer(self.content, nil)
  142. end
  143. self.content = nil
  144. if tolua.getpeer(self.btnClose) ~= nil then
  145. tolua.setpeer(self.btnClose, nil)
  146. end
  147. self.btnClose = nil
  148. if tolua.getpeer(self.btnCompose) ~= nil then
  149. tolua.setpeer(self.btnCompose, nil)
  150. end
  151. self.btnCompose = nil
  152. if tolua.getpeer(self.text) ~= nil then
  153. tolua.setpeer(self.text, nil)
  154. end
  155. self.text = nil
  156. self.transform = nil
  157. self.gameObject = nil
  158. self.inited = false
  159. end
  160. return UIForgePopView