引导问题修复
This commit is contained in:
parent
62989cb4cf
commit
9f9ee9e1d9
@ -6,8 +6,8 @@ local ARENA_COMP = "app/ui/main_city/component/arena_comp"
|
|||||||
|
|
||||||
local BOTTOM_HEIGHT = 120
|
local BOTTOM_HEIGHT = 120
|
||||||
|
|
||||||
function MainComp:ctor(params)
|
function MainComp:setParentUI(parentUI)
|
||||||
self.parentUI = params.parentUI
|
self.parentUI = parentUI
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:init()
|
function MainComp:init()
|
||||||
|
|||||||
@ -327,7 +327,7 @@ function MainCityUI:initComp()
|
|||||||
local mainComp = uiMap["main_ui.sub_ui_node.main_comp"]
|
local mainComp = uiMap["main_ui.sub_ui_node.main_comp"]
|
||||||
mainComp:initPrefabHelper()
|
mainComp:initPrefabHelper()
|
||||||
mainComp:genAllChildren()
|
mainComp:genAllChildren()
|
||||||
self.mainComp = mainComp:addLuaComponent(MAIN_COMP, {parentUI = self})
|
self.mainComp = mainComp:addLuaComponent(MAIN_COMP)
|
||||||
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.MAIN] = self.mainComp
|
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.MAIN] = self.mainComp
|
||||||
-- 英雄
|
-- 英雄
|
||||||
local heroComp = uiMap["main_ui.sub_ui_node.hero_ui"]
|
local heroComp = uiMap["main_ui.sub_ui_node.hero_ui"]
|
||||||
@ -340,6 +340,9 @@ function MainCityUI:initComp()
|
|||||||
shopComp:initPrefabHelper()
|
shopComp:initPrefabHelper()
|
||||||
shopComp:genAllChildren()
|
shopComp:genAllChildren()
|
||||||
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.SHOP] = shopComp:addLuaComponent(SHOP_COMP)
|
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.SHOP] = shopComp:addLuaComponent(SHOP_COMP)
|
||||||
|
|
||||||
|
-- 初始完成后设置
|
||||||
|
self.mainComp:setParentUI(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -758,8 +761,10 @@ function MainCityUI:switchMainCompModule(moduleKey)
|
|||||||
if self.selectedIndex ~= GConst.MainCityConst.BOTTOM_PAGE.MAIN then
|
if self.selectedIndex ~= GConst.MainCityConst.BOTTOM_PAGE.MAIN then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.mainComp:refreshModule(ModuleManager.MaincityManager:getCurModule())
|
self.mainComp:refreshModule(ModuleManager.MaincityManager:getCurModule())
|
||||||
|
if ModuleManager.MaincityManager:getCurModule() == GConst.MainCityConst.MAIN_MODULE.CHAPTER then
|
||||||
|
self:checkMainPop()
|
||||||
|
end
|
||||||
local module = self.mainComp:getCurModule()
|
local module = self.mainComp:getCurModule()
|
||||||
if module then
|
if module then
|
||||||
self:setTopNodeVisible(module:isShowTopNode())
|
self:setTopNodeVisible(module:isShowTopNode())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user