ro-webgl/Assets/Lua/UI/GridViewItem/LiveRoomGiftItem_Generate.lua

179 lines
4.5 KiB
Lua

---@class LiveRoomGiftItem__Generate_img_gift
---@field public gameObject UnityEngine.GameObject
---@field public image UnityEngine.UI.Image
---@class LiveRoomGiftItem__Generate_text_price_on
---@field public gameObject UnityEngine.GameObject
---@field public text TMPro.TextMeshProUGUI
---@class LiveRoomGiftItem__Generate_btn_send
---@field public gameObject UnityEngine.GameObject
---@field public button UnityEngine.UI.Button
---@class LiveRoomGiftItem__Generate_text_price_off
---@field public gameObject UnityEngine.GameObject
---@field public text TMPro.TextMeshProUGUI
---@class LiveRoomGiftItem__Generate_text_name
---@field public gameObject UnityEngine.GameObject
---@field public text TMPro.TextMeshProUGUI
---@class LiveRoomGiftItem__Generate
---@field private gameObject UnityEngine.GameObject
---@field private transform UnityEngine.Transform
---@field private button UnityEngine.UI.Button
---@field private text_name LiveRoomGiftItem__Generate_text_name
---@field private text_price_off LiveRoomGiftItem__Generate_text_price_off
---@field private rect_send UnityEngine.GameObject
---@field private btn_send LiveRoomGiftItem__Generate_btn_send
---@field private text_price_on LiveRoomGiftItem__Generate_text_price_on
---@field private img_gift LiveRoomGiftItem__Generate_img_gift
local LiveRoomGiftItemView = class("LiveRoomGiftItemView")
function LiveRoomGiftItemView:ctor()
end
---@private
function LiveRoomGiftItemView:SetActive(result)
self.gameObject:SetActive(result)
end
---@private
function LiveRoomGiftItemView:InitGenerate(Root, data)
self.transform = Root
self.inited = true
local tmp
self:InitGenerate__1(Root,data)
self:InitGenerate__2(Root,data)
self:InitGenerate__3(Root,data)
self:InitGenerate__4(Root,data)
self:InitGenerate__5(Root,data)
self:InitGenerate__6(Root,data)
self:InitGenerate__7(Root,data)
end
---@private
function LiveRoomGiftItemView:InitGenerate__1(Root, data)
--[[
Root
--]]
self.button = Root:GetComponent(Enum.TypeInfo.Button)
end
---@private
function LiveRoomGiftItemView:InitGenerate__2(Root, data)
--[[
text_name
--]]
local tmp = Root:Find("text_name").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.text_name = tmp
tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
end
---@private
function LiveRoomGiftItemView:InitGenerate__3(Root, data)
--[[
text_price_off
--]]
local tmp = Root:Find("text_price_off").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.text_price_off = tmp
tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
end
---@private
function LiveRoomGiftItemView:InitGenerate__4(Root, data)
--[[
rect_send
--]]
local tmp = Root:Find("rect_send").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.rect_send = tmp
end
---@private
function LiveRoomGiftItemView:InitGenerate__5(Root, data)
--[[
rect_send/btn_send
--]]
local tmp = Root:Find("rect_send/btn_send").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.btn_send = tmp
tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
end
---@private
function LiveRoomGiftItemView:InitGenerate__6(Root, data)
--[[
rect_send/text_price_on
--]]
local tmp = Root:Find("rect_send/text_price_on").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.text_price_on = tmp
tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
end
---@private
function LiveRoomGiftItemView:InitGenerate__7(Root, data)
--[[
img_gift
--]]
local tmp = Root:Find("img_gift").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.img_gift = tmp
tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
end
---@private
function LiveRoomGiftItemView:GenerateDestroy()
if tolua.getpeer(self.text_name) ~= nil then
tolua.setpeer(self.text_name, nil)
end
self.text_name = nil
if tolua.getpeer(self.text_price_off) ~= nil then
tolua.setpeer(self.text_price_off, nil)
end
self.text_price_off = nil
if tolua.getpeer(self.rect_send) ~= nil then
tolua.setpeer(self.rect_send, nil)
end
self.rect_send = nil
if tolua.getpeer(self.btn_send) ~= nil then
tolua.setpeer(self.btn_send, nil)
end
self.btn_send = nil
if tolua.getpeer(self.text_price_on) ~= nil then
tolua.setpeer(self.text_price_on, nil)
end
self.text_price_on = nil
if tolua.getpeer(self.img_gift) ~= nil then
tolua.setpeer(self.img_gift, nil)
end
self.img_gift = nil
self.transform = nil
self.gameObject = nil
self.inited = false
end
return LiveRoomGiftItemView