miduo_client/Assets/ManagedResources/~Lua/Modules/Map/MapAwardPanel.lua

71 lines
2.0 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
MapAwardPanel = Inherit(BasePanel)
local this=MapAwardPanel
local nameText--名字
local nameInfoText--名字詳情
local awardText1--
local awardText2--
local itemUpGrid--父级
local heroGrid--父级
local sureBtn
local closeBtn
local itemListUp
local AwardItemData=ConfigManager.GetConfig(ConfigName.ItemConfig)
--初始化组件(用于子类重写)
function MapAwardPanel:InitComponent()
2021-04-21 13:12:04 +08:00
this.spLoader = SpriteLoader.New()
2020-05-09 13:31:21 +08:00
this.nameText=Util.GetGameObject (self.transform, "title/nameText")
this.nameInfoText=Util.GetGameObject (self.transform, "title/nameInfoText")
this.awardText1=Util.GetGameObject (self.transform, "middle/awardText")
this.itemUpGrid=Util.GetGameObject (self.transform,"middle/awardGrid")
this.itemDownGrid=Util.GetGameObject (self.transform,"middle/bagGrid")
this.heroGrid=Util.GetGameObject (self.transform,"heroRect/heroGrid")
this.item = Util.GetGameObject(self.gameObject, "item")
this.sureBtn=Util.GetGameObject (self.transform,"sureBtn")
this.closeBtn=Util.GetGameObject (self.transform,"bg")
--背包实例化
end
--绑定事件(用于子类重写)
function MapAwardPanel:BindEvent()
Util.AddClick(this.sureBtn, function ()
self:ClosePanel()
end)
Util.AddClick(this.closeBtn, function ()
--self:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function MapAwardPanel:AddListener()
end
--移除事件监听(用于子类重写)
function MapAwardPanel:RemoveListener()
end
--界面打开时调用(用于子类重写)
function MapAwardPanel:OnOpen(...)
local arg={...}
2021-03-02 16:53:12 +08:00
this.nameText:GetComponent("Text").text=Language[11227]
2021-10-26 16:00:31 +08:00
this.nameInfoText:GetComponent("Text").text=Language[11228]
2020-05-09 13:31:21 +08:00
end
--界面关闭时调用(用于子类重写)
function MapAwardPanel:OnClose()
end
--界面销毁时调用(用于子类重写)
function MapAwardPanel:OnDestroy()
2021-04-21 13:12:04 +08:00
this.spLoader:Destroy()
2020-05-09 13:31:21 +08:00
end
2021-04-21 13:12:04 +08:00
return MapAwardPanel