Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
This commit is contained in:
commit
73ad9f50f3
@ -1,6 +1,6 @@
|
|||||||
local BottomBtnCell = class("BottomBtnCell", BaseCell)
|
local BottomBtnCell = class("BottomBtnCell", BaseCell)
|
||||||
|
|
||||||
function BottomBtnCell:refresh(desc, selected)
|
function BottomBtnCell:refresh(desc, selected, showAni)
|
||||||
self.selected = selected
|
self.selected = selected
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
local icon = uiMap["bottom_btn_cell.icon"]
|
local icon = uiMap["bottom_btn_cell.icon"]
|
||||||
@ -11,7 +11,13 @@ function BottomBtnCell:refresh(desc, selected)
|
|||||||
local pos = -64
|
local pos = -64
|
||||||
icon:setLocalPositionY(pos)
|
icon:setLocalPositionY(pos)
|
||||||
if selected then
|
if selected then
|
||||||
GFunc.goTargetElasticityY(icon,nil, 12,0.6)
|
if showAni then
|
||||||
|
GFunc.goTargetElasticityY(icon,nil, 12,0.6)
|
||||||
|
else
|
||||||
|
GFunc.goTargetElasticityY(icon, true)
|
||||||
|
icon:setLocalPositionY(pos + 12*2)
|
||||||
|
icon:setLocalScale(iconScale, iconScale, iconScale)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
icon:setLocalScale(iconScale, iconScale, iconScale)
|
icon:setLocalScale(iconScale, iconScale, iconScale)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -219,13 +219,15 @@ function MainCityUI:refreshBottom(selectedIndex, playAnim)
|
|||||||
local isLeft = self.selectedIndex < oldIndex
|
local isLeft = self.selectedIndex < oldIndex
|
||||||
local offset = isLeft and -20 or 20
|
local offset = isLeft and -20 or 20
|
||||||
GFunc.goTargetPosXShake(self.bottomBgSelected, nil, targetX, offset)
|
GFunc.goTargetPosXShake(self.bottomBgSelected, nil, targetX, offset)
|
||||||
self:refreshBottomCell()
|
self:refreshBottomCell(true)
|
||||||
|
else
|
||||||
|
self:refreshBottomCell(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainCityUI:refreshBottomCell()
|
function MainCityUI:refreshBottomCell(showAni)
|
||||||
for i, cell in ipairs(self.bottomBtnCells) do
|
for i, cell in ipairs(self.bottomBtnCells) do
|
||||||
cell:refresh(I18N:getGlobalText("MAIN_BTN_" .. i), i == self.selectedIndex, i)
|
cell:refresh(I18N:getGlobalText("MAIN_BTN_" .. i), i == self.selectedIndex, showAni)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user