下边页签动效
This commit is contained in:
parent
b5d1c15981
commit
2dc875d7d7
@ -8,7 +8,7 @@ function BottomBtnCell:refresh(desc, selected, showAni)
|
||||
local iconScale = 1
|
||||
local descContent = selected and desc or GConst.EMPTY_STRING
|
||||
descObj:setText(descContent)
|
||||
local pos = -64
|
||||
local pos = -40
|
||||
icon:setLocalPositionY(pos)
|
||||
if selected then
|
||||
if showAni then
|
||||
|
||||
@ -34,6 +34,8 @@ function MainComp:initChapter()
|
||||
fightBtn:addClickListener(function()
|
||||
self:onFightBtnClick()
|
||||
end)
|
||||
|
||||
self.uiMap["main_comp.chapter.effect_node.ui_spine_obj"]:playAnim("idle", true, false)
|
||||
end
|
||||
|
||||
function MainComp:initStageFormation()
|
||||
|
||||
@ -161,10 +161,8 @@ function MainCityUI:initBottomUI()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
self.darkImg = uiMap["main_ui.bottom_node.dark_img"]
|
||||
self.bottomBtnCells = {}
|
||||
self.bottomBtnIcons = {}
|
||||
self.lineObjs = {}
|
||||
for i = 1, 2 do
|
||||
self.bottomBtnIcons[i] = uiMap["main_ui.bottom_node.bottom_btn_cell_" .. i .. ".icon"]
|
||||
local cellCom = CellManager:addCellComp(uiMap["main_ui.bottom_node.bottom_btn_cell_" .. i], BOTTOM_BTN_CELL)
|
||||
cellCom:addClickListener(function()
|
||||
if self.selectedIndex == i then
|
||||
@ -184,6 +182,12 @@ function MainCityUI:initBottomUI()
|
||||
table.insert(self.lineObjs, lineObj)
|
||||
end
|
||||
end
|
||||
|
||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnim("born", true, false)
|
||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:setTimeScale(0.3)
|
||||
|
||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnim("born", true, false)
|
||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:setTimeScale(0.3)
|
||||
end
|
||||
|
||||
function MainCityUI:initComp()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user