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