miduo_client/Assets/ManagedResources/~Lua/Modules/Guild/GuildGetStarPopup.lua

53 lines
1.5 KiB
Lua
Raw Normal View History

2021-04-21 13:12:04 +08:00
require("Base/BasePanel")
2020-05-09 13:31:21 +08:00
local GuildGetStarPopup = Inherit(BasePanel)
local this = GuildGetStarPopup
--初始化组件(用于子类重写)
function GuildGetStarPopup:InitComponent()
2021-04-21 13:12:04 +08:00
this.spLoader = SpriteLoader.New()
2020-05-09 13:31:21 +08:00
this.btnBack = Util.GetGameObject(self.transform, "btnBack")
this.ScrollView = Util.GetGameObject(self.transform, "ScrollView")
this.starPanel = Util.GetGameObject(self.transform, "star")
this.starNum = Util.GetGameObject(this.starPanel, "num")
end
--绑定事件(用于子类重写)
function GuildGetStarPopup:BindEvent()
Util.AddClick(this.btnBack, function()
this:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function GuildGetStarPopup:AddListener()
end
--移除事件监听(用于子类重写)
function GuildGetStarPopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function GuildGetStarPopup:OnOpen(starNum)
this.starNum:GetComponent("Text").text = starNum
this.starPanel:SetActive(true)
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function GuildGetStarPopup:OnShow()
--this.ScrollView:SetActive(false)
end
--界面关闭时调用(用于子类重写)
function GuildGetStarPopup:OnClose()
--this.ScrollView:SetActive(true)
this.starPanel:SetActive(false)
end
--界面销毁时调用(用于子类重写)
function GuildGetStarPopup:OnDestroy()
2021-04-21 13:12:04 +08:00
this.spLoader:Destroy()
2020-05-09 13:31:21 +08:00
end
2020-06-23 18:36:24 +08:00
return GuildGetStarPopup