UISignDailyView_Generate.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. ---@class UISignDaily__Generate_btnClose
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UISignDaily__Generate_signRewardItem
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public rectTransform UnityEngine.RectTransform
  7. ---@field public image UnityEngine.UI.Image
  8. ---@class UISignDaily__Generate_scrollView
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public loopGridView SuperScrollView.LoopGridView
  11. ---@class UISignDaily__Generate_AnyBtn
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public button UnityEngine.UI.Button
  14. ---@class UISignDaily__Generate_uIAnimator
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public animator UnityEngine.Animator
  17. ---@class UISignDaily__Generate
  18. ---@field private gameObject UnityEngine.GameObject
  19. ---@field private transform UnityEngine.Transform
  20. ---@field private uIAnimator UISignDaily__Generate_uIAnimator
  21. ---@field private AnyBtn UISignDaily__Generate_AnyBtn
  22. ---@field private scrollView UISignDaily__Generate_scrollView
  23. ---@field private content UnityEngine.GameObject
  24. ---@field private signRewardItem UISignDaily__Generate_signRewardItem
  25. ---@field private btnClose UISignDaily__Generate_btnClose
  26. ---@field private dscBox UnityEngine.GameObject
  27. local UISignDailyView = class("UISignDailyView", require("UIViewBase"))
  28. function UISignDailyView:ctor()
  29. end
  30. ---@private
  31. function UISignDailyView:SetActive(result)
  32. self.gameObject:SetActive(result)
  33. end
  34. ---@private
  35. function UISignDailyView:InitGenerate(Root, data)
  36. self.transform = Root
  37. self.inited = true
  38. if self.super.Init then
  39. self.super.Init(self)
  40. end
  41. local tmp
  42. self:InitGenerate__1(Root,data)
  43. self:InitGenerate__2(Root,data)
  44. self:InitGenerate__3(Root,data)
  45. self:InitGenerate__4(Root,data)
  46. self:InitGenerate__5(Root,data)
  47. self:InitGenerate__6(Root,data)
  48. self:InitGenerate__7(Root,data)
  49. end
  50. ---@private
  51. function UISignDailyView: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 UISignDailyView: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 UISignDailyView:InitGenerate__3(Root, data)
  77. --[[
  78. UIAnimator/Window/ScrollView
  79. --]]
  80. local tmp = Root:Find("UIAnimator/Window/ScrollView").gameObject
  81. if tolua.getpeer(tmp) == nil then
  82. tolua.setpeer(tmp, {})
  83. end
  84. self.scrollView = tmp
  85. tmp.loopGridView = tmp:GetComponent(Enum.TypeInfo.LoopGridView)
  86. end
  87. ---@private
  88. function UISignDailyView:InitGenerate__4(Root, data)
  89. --[[
  90. UIAnimator/Window/ScrollView/View/Content
  91. --]]
  92. local tmp = Root:Find("UIAnimator/Window/ScrollView/View/Content").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.content = tmp
  97. end
  98. ---@private
  99. function UISignDailyView:InitGenerate__5(Root, data)
  100. --[[
  101. UIAnimator/Window/ScrollView/View/Content/SignRewardItem
  102. --]]
  103. local tmp = Root:Find("UIAnimator/Window/ScrollView/View/Content/SignRewardItem").gameObject
  104. if tolua.getpeer(tmp) == nil then
  105. tolua.setpeer(tmp, {})
  106. end
  107. self.signRewardItem = CommonUtil.BindGridViewItem2LuaStatic("SignRewardItem", tmp)
  108. self.signRewardItem.prefabName = "SignRewardItem"
  109. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  110. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  111. end
  112. ---@private
  113. function UISignDailyView:InitGenerate__6(Root, data)
  114. --[[
  115. UIAnimator/Window/BtnClose
  116. --]]
  117. local tmp = Root:Find("UIAnimator/Window/BtnClose").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.btnClose = tmp
  122. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  123. end
  124. ---@private
  125. function UISignDailyView:InitGenerate__7(Root, data)
  126. --[[
  127. UIAnimator/Window/DscBox
  128. --]]
  129. local tmp = Root:Find("UIAnimator/Window/DscBox").gameObject
  130. if tolua.getpeer(tmp) == nil then
  131. tolua.setpeer(tmp, {})
  132. end
  133. self.dscBox = tmp
  134. end
  135. ---@private
  136. function UISignDailyView:GenerateDestroy()
  137. if tolua.getpeer(self.uIAnimator) ~= nil then
  138. tolua.setpeer(self.uIAnimator, nil)
  139. end
  140. self.uIAnimator = nil
  141. if tolua.getpeer(self.AnyBtn) ~= nil then
  142. tolua.setpeer(self.AnyBtn, nil)
  143. end
  144. self.AnyBtn = nil
  145. if tolua.getpeer(self.scrollView) ~= nil then
  146. tolua.setpeer(self.scrollView, nil)
  147. end
  148. self.scrollView = nil
  149. if tolua.getpeer(self.content) ~= nil then
  150. tolua.setpeer(self.content, nil)
  151. end
  152. self.content = nil
  153. if self.signRewardItem.GenerateDestroy ~= nil then
  154. self.signRewardItem:GenerateDestroy()
  155. end
  156. if tolua.getpeer(self.signRewardItem) ~= nil then
  157. tolua.setpeer(self.signRewardItem, nil)
  158. end
  159. self.signRewardItem = nil
  160. if tolua.getpeer(self.btnClose) ~= nil then
  161. tolua.setpeer(self.btnClose, nil)
  162. end
  163. self.btnClose = nil
  164. if tolua.getpeer(self.dscBox) ~= nil then
  165. tolua.setpeer(self.dscBox, nil)
  166. end
  167. self.dscBox = nil
  168. self.transform = nil
  169. self.gameObject = nil
  170. self.inited = false
  171. end
  172. return UISignDailyView