UIGuildDemonRewardView_Generate.lua 5.0 KB

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