UISimpleWebView_Generate.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ---@class UISimpleWeb__Generate_btnClose
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UISimpleWeb__Generate_webView
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public wentingCanvasWebVewPrefab Vuplex.WebView.WentingCanvasWebVewPrefab
  7. ---@class UISimpleWeb__Generate_AnyBtn
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UISimpleWeb__Generate
  11. ---@field private gameObject UnityEngine.GameObject
  12. ---@field private transform UnityEngine.Transform
  13. ---@field private AnyBtn UISimpleWeb__Generate_AnyBtn
  14. ---@field private webView UISimpleWeb__Generate_webView
  15. ---@field private btnClose UISimpleWeb__Generate_btnClose
  16. local UISimpleWebView = class("UISimpleWebView", require("UIViewBase"))
  17. function UISimpleWebView:ctor()
  18. end
  19. ---@private
  20. function UISimpleWebView:SetActive(result)
  21. self.gameObject:SetActive(result)
  22. end
  23. ---@private
  24. function UISimpleWebView:InitGenerate(Root, data)
  25. self.transform = Root
  26. self.inited = true
  27. if self.super.Init then
  28. self.super.Init(self)
  29. end
  30. local tmp
  31. self:InitGenerate__1(Root,data)
  32. self:InitGenerate__2(Root,data)
  33. self:InitGenerate__3(Root,data)
  34. self:InitGenerate__4(Root,data)
  35. end
  36. ---@private
  37. function UISimpleWebView:InitGenerate__1(Root, data)
  38. --[[
  39. Root
  40. --]]
  41. end
  42. ---@private
  43. function UISimpleWebView:InitGenerate__2(Root, data)
  44. --[[
  45. Alpha
  46. --]]
  47. local tmp = Root:Find("Alpha").gameObject
  48. if tolua.getpeer(tmp) == nil then
  49. tolua.setpeer(tmp, {})
  50. end
  51. self.AnyBtn = tmp
  52. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  53. end
  54. ---@private
  55. function UISimpleWebView:InitGenerate__3(Root, data)
  56. --[[
  57. Window/WebView
  58. --]]
  59. local tmp = Root:Find("Window/WebView").gameObject
  60. if tolua.getpeer(tmp) == nil then
  61. tolua.setpeer(tmp, {})
  62. end
  63. self.webView = tmp
  64. tmp.wentingCanvasWebVewPrefab = tmp:GetComponent(Enum.TypeInfo.WentingCanvasWebVewPrefab)
  65. end
  66. ---@private
  67. function UISimpleWebView:InitGenerate__4(Root, data)
  68. --[[
  69. Window/BtnClose
  70. --]]
  71. local tmp = Root:Find("Window/BtnClose").gameObject
  72. if tolua.getpeer(tmp) == nil then
  73. tolua.setpeer(tmp, {})
  74. end
  75. self.btnClose = tmp
  76. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  77. end
  78. ---@private
  79. function UISimpleWebView:GenerateDestroy()
  80. if tolua.getpeer(self.AnyBtn) ~= nil then
  81. tolua.setpeer(self.AnyBtn, nil)
  82. end
  83. self.AnyBtn = nil
  84. if tolua.getpeer(self.webView) ~= nil then
  85. tolua.setpeer(self.webView, nil)
  86. end
  87. self.webView = nil
  88. if tolua.getpeer(self.btnClose) ~= nil then
  89. tolua.setpeer(self.btnClose, nil)
  90. end
  91. self.btnClose = nil
  92. self.transform = nil
  93. self.gameObject = nil
  94. self.inited = false
  95. end
  96. return UISimpleWebView