UISimpleWebView_Generate.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. ---@class UISimpleWeb__Generate_reloadBtn
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UISimpleWeb__Generate_goForwardBtn
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UISimpleWeb__Generate_goBackBtn
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UISimpleWeb__Generate_btnClose
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UISimpleWeb__Generate_webView
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public wentingCanvasWebVewPrefab Vuplex.WebView.WentingCanvasWebVewPrefab
  16. ---@class UISimpleWeb__Generate_AnyBtn
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public button UnityEngine.UI.Button
  19. ---@class UISimpleWeb__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private AnyBtn UISimpleWeb__Generate_AnyBtn
  23. ---@field private webView UISimpleWeb__Generate_webView
  24. ---@field private btnClose UISimpleWeb__Generate_btnClose
  25. ---@field private webBtns UnityEngine.GameObject
  26. ---@field private goBackBtn UISimpleWeb__Generate_goBackBtn
  27. ---@field private goForwardBtn UISimpleWeb__Generate_goForwardBtn
  28. ---@field private reloadBtn UISimpleWeb__Generate_reloadBtn
  29. local UISimpleWebView = class("UISimpleWebView", require("UIViewBase"))
  30. function UISimpleWebView:ctor()
  31. end
  32. ---@private
  33. function UISimpleWebView:SetActive(result)
  34. self.gameObject:SetActive(result)
  35. end
  36. ---@private
  37. function UISimpleWebView:InitGenerate(Root, data)
  38. self.transform = Root
  39. self.inited = true
  40. if self.super.Init then
  41. self.super.Init(self)
  42. end
  43. local tmp
  44. self:InitGenerate__1(Root,data)
  45. self:InitGenerate__2(Root,data)
  46. self:InitGenerate__3(Root,data)
  47. self:InitGenerate__4(Root,data)
  48. self:InitGenerate__5(Root,data)
  49. self:InitGenerate__6(Root,data)
  50. self:InitGenerate__7(Root,data)
  51. self:InitGenerate__8(Root,data)
  52. end
  53. ---@private
  54. function UISimpleWebView:InitGenerate__1(Root, data)
  55. --[[
  56. Root
  57. --]]
  58. end
  59. ---@private
  60. function UISimpleWebView:InitGenerate__2(Root, data)
  61. --[[
  62. Alpha
  63. --]]
  64. local tmp = Root:Find("Alpha").gameObject
  65. if tolua.getpeer(tmp) == nil then
  66. tolua.setpeer(tmp, {})
  67. end
  68. self.AnyBtn = tmp
  69. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  70. end
  71. ---@private
  72. function UISimpleWebView:InitGenerate__3(Root, data)
  73. --[[
  74. Window/WebView
  75. --]]
  76. local tmp = Root:Find("Window/WebView").gameObject
  77. if tolua.getpeer(tmp) == nil then
  78. tolua.setpeer(tmp, {})
  79. end
  80. self.webView = tmp
  81. tmp.wentingCanvasWebVewPrefab = tmp:GetComponent(Enum.TypeInfo.WentingCanvasWebVewPrefab)
  82. end
  83. ---@private
  84. function UISimpleWebView:InitGenerate__4(Root, data)
  85. --[[
  86. Window/BtnClose
  87. --]]
  88. local tmp = Root:Find("Window/BtnClose").gameObject
  89. if tolua.getpeer(tmp) == nil then
  90. tolua.setpeer(tmp, {})
  91. end
  92. self.btnClose = tmp
  93. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  94. end
  95. ---@private
  96. function UISimpleWebView:InitGenerate__5(Root, data)
  97. --[[
  98. Window/WebBtns
  99. --]]
  100. local tmp = Root:Find("Window/WebBtns").gameObject
  101. if tolua.getpeer(tmp) == nil then
  102. tolua.setpeer(tmp, {})
  103. end
  104. self.webBtns = tmp
  105. end
  106. ---@private
  107. function UISimpleWebView:InitGenerate__6(Root, data)
  108. --[[
  109. Window/WebBtns/GoBackBtn
  110. --]]
  111. local tmp = Root:Find("Window/WebBtns/GoBackBtn").gameObject
  112. if tolua.getpeer(tmp) == nil then
  113. tolua.setpeer(tmp, {})
  114. end
  115. self.goBackBtn = tmp
  116. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  117. end
  118. ---@private
  119. function UISimpleWebView:InitGenerate__7(Root, data)
  120. --[[
  121. Window/WebBtns/GoForwardBtn
  122. --]]
  123. local tmp = Root:Find("Window/WebBtns/GoForwardBtn").gameObject
  124. if tolua.getpeer(tmp) == nil then
  125. tolua.setpeer(tmp, {})
  126. end
  127. self.goForwardBtn = tmp
  128. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  129. end
  130. ---@private
  131. function UISimpleWebView:InitGenerate__8(Root, data)
  132. --[[
  133. Window/WebBtns/ReloadBtn
  134. --]]
  135. local tmp = Root:Find("Window/WebBtns/ReloadBtn").gameObject
  136. if tolua.getpeer(tmp) == nil then
  137. tolua.setpeer(tmp, {})
  138. end
  139. self.reloadBtn = tmp
  140. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  141. end
  142. ---@private
  143. function UISimpleWebView:GenerateDestroy()
  144. if tolua.getpeer(self.AnyBtn) ~= nil then
  145. tolua.setpeer(self.AnyBtn, nil)
  146. end
  147. self.AnyBtn = nil
  148. if tolua.getpeer(self.webView) ~= nil then
  149. tolua.setpeer(self.webView, nil)
  150. end
  151. self.webView = nil
  152. if tolua.getpeer(self.btnClose) ~= nil then
  153. tolua.setpeer(self.btnClose, nil)
  154. end
  155. self.btnClose = nil
  156. if tolua.getpeer(self.webBtns) ~= nil then
  157. tolua.setpeer(self.webBtns, nil)
  158. end
  159. self.webBtns = nil
  160. if tolua.getpeer(self.goBackBtn) ~= nil then
  161. tolua.setpeer(self.goBackBtn, nil)
  162. end
  163. self.goBackBtn = nil
  164. if tolua.getpeer(self.goForwardBtn) ~= nil then
  165. tolua.setpeer(self.goForwardBtn, nil)
  166. end
  167. self.goForwardBtn = nil
  168. if tolua.getpeer(self.reloadBtn) ~= nil then
  169. tolua.setpeer(self.reloadBtn, nil)
  170. end
  171. self.reloadBtn = nil
  172. self.transform = nil
  173. self.gameObject = nil
  174. self.inited = false
  175. end
  176. return UISimpleWebView