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