【山河社稷图】图片加载
parent
417dcbf116
commit
029ea47266
|
|
@ -6,6 +6,7 @@ local curChapterId = 0
|
|||
local npc
|
||||
--初始化组件(用于子类重写)
|
||||
function FightLevelChapterPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
|
||||
self.sortBtn = Util.GetGameObject(self.gameObject, "sortBtn")
|
||||
self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
|
||||
|
|
@ -83,6 +84,7 @@ function this.SingleChapterDataShow(go, data)
|
|||
curIndexImage:GetComponent("Image").sprite = this.spLoader:LoadSprite(data.config.BigNumber)--self.spLoader:LoadSprite(GetResourcePath(data.config.BigNumber))
|
||||
Util.GetGameObject(go, "chapterImage"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.config.Map)
|
||||
Util.GetGameObject(go, "star/starNum"):GetComponent("Text").text = data.stars.."/"..data.curMaxStarNum
|
||||
|
||||
Util.GetGameObject(go, "chapterName"):GetComponent("Text").text = data.config.Name
|
||||
Util.SetGray(go, curChapterId < data.chapterId)
|
||||
Util.AddOnceClick(go, function()
|
||||
|
|
@ -111,6 +113,7 @@ function FightLevelChapterPanel:OnDestroy()
|
|||
npc:OnClose()
|
||||
end
|
||||
SubUIManager.Close(this.UpView)
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return FightLevelChapterPanel
|
||||
|
|
@ -5,6 +5,7 @@ local orginLayer
|
|||
local chapterDataId = 0
|
||||
--初始化组件(用于子类重写)
|
||||
function FightLevelOpenChapterPopup:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "CloseBtn")
|
||||
this.titleImage = Util.GetGameObject(self.gameObject, "bg/titleImage"):GetComponent("Image")
|
||||
this.chapterName = Util.GetGameObject(self.gameObject, "bg/ziImage/Text"):GetComponent("Text")
|
||||
|
|
@ -41,11 +42,9 @@ end
|
|||
--界面关闭时调用(用于子类重写)
|
||||
function FightLevelOpenChapterPopup:OnClose()
|
||||
FightLevelManager.SetisShowChapterOpenPopup(false)
|
||||
LogYellow("UIManager.IsOpen(UIName.FightLevelSingleChapterPanel) "..tostring(UIManager.IsOpen(UIName.FightLevelSingleChapterPanel)))
|
||||
-- if UIManager.IsOpen(UIName.FightLevelSingleChapterPanel) then
|
||||
local curFightLevelSingleChapterPanel = UIManager.GetOpenPanel(UIName.FightLevelSingleChapterPanel)
|
||||
if curFightLevelSingleChapterPanel then
|
||||
LogYellow("sssssssssssssssssss")
|
||||
curFightLevelSingleChapterPanel.LeftOrRightBtnClickEvent(2)
|
||||
end
|
||||
-- end
|
||||
|
|
@ -53,6 +52,7 @@ end
|
|||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function FightLevelOpenChapterPopup:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return FightLevelOpenChapterPopup
|
||||
|
|
@ -9,6 +9,7 @@ local chapterData = {}
|
|||
local allMissionDailyBoxItemPres = {}
|
||||
--初始化组件(用于子类重写)
|
||||
function FightLevelSingleChapterPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
|
||||
this.chapterNameText = Util.GetGameObject(self.gameObject, "rightUp/chapterNameText"):GetComponent("Text")
|
||||
this.chapterNameImage = Util.GetGameObject(self.gameObject, "rightUp/starInfoBg/Image/Image"):GetComponent("Image")
|
||||
|
|
@ -314,6 +315,7 @@ end
|
|||
--界面销毁时调用(用于子类重写)
|
||||
function FightLevelSingleChapterPanel:OnDestroy()
|
||||
allMissionDailyBoxItemPres = {}
|
||||
this.spLoader:Destroy()
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue