布局
This commit is contained in:
parent
af4c09d6b8
commit
9a7f8b069f
@ -95,7 +95,7 @@ function BoxHeroUI:refresh()
|
||||
self.buyBtnIcon:setSprite(GFunc.getIconRes(cost.id))
|
||||
self.buyBtnTx:setText(cost.num)
|
||||
end
|
||||
GFunc.centerImgAndTx(self.buyBtnIcon, self.buyBtnTx, 20)
|
||||
GFunc.centerImgAndTx(self.buyBtnIcon, self.buyBtnTx, 5)
|
||||
end
|
||||
|
||||
function BoxHeroUI:onClickSummon()
|
||||
|
||||
@ -53,7 +53,7 @@ function BoxRewardUI:onLoadRootComplete()
|
||||
if self.coinNum > 0 then
|
||||
self.coinNode:setVisible(true)
|
||||
self.coinTx:setText(self.coinNum)
|
||||
GFunc.centerImgAndTx(self.coinIcon, self.coinTx, 20)
|
||||
GFunc.centerImgAndTx(self.coinIcon, self.coinTx, 5)
|
||||
else
|
||||
self.coinNode:setVisible(false)
|
||||
end
|
||||
|
||||
@ -94,7 +94,7 @@ function BoxSellCell:refreshCost()
|
||||
self.boxBuyBtnCoin1:setSprite(GFunc.getIconRes(cost1.id))
|
||||
self.boxBuyBtnTx1:setText(cost1.num)
|
||||
end
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin1, self.boxBuyBtnTx1, 20)
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin1, self.boxBuyBtnTx1, 5)
|
||||
|
||||
if GFunc.checkCost(costItem2.id, costItem2.num, false) then
|
||||
self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(costItem2.id))
|
||||
@ -103,7 +103,7 @@ function BoxSellCell:refreshCost()
|
||||
self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(cost2.id))
|
||||
self.boxBuyBtnTx2:setText(cost2.num)
|
||||
end
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin2, self.boxBuyBtnTx2, 20)
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin2, self.boxBuyBtnTx2, 5)
|
||||
|
||||
if GFunc.checkCost(costItem3.id, costItem3.num, false) then
|
||||
self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(costItem3.id))
|
||||
@ -112,7 +112,7 @@ function BoxSellCell:refreshCost()
|
||||
self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(cost3.id))
|
||||
self.boxBuyBtnTx3:setText(cost3.num)
|
||||
end
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin3, self.boxBuyBtnTx3, 20)
|
||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin3, self.boxBuyBtnTx3, 5)
|
||||
end
|
||||
|
||||
function BoxSellCell:onClickBox(summonType)
|
||||
|
||||
@ -40,7 +40,7 @@ function GemCell:refresh(id, cfgInfo)
|
||||
local adLeftCount = adMaxTimes - bought
|
||||
if adLeftCount > 0 then
|
||||
self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 20)
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 5)
|
||||
self.sellOutText:setVisible(false)
|
||||
|
||||
self:getBaseObject():addRedPoint(105, 150, 0.6)
|
||||
@ -58,7 +58,7 @@ function GemCell:refresh(id, cfgInfo)
|
||||
self.doubleNode:setVisible(true)
|
||||
self.doubleDesc:setText("剩余次数:" .. tostring(leftDoubleTimes) .. "TD") -- TODOJ
|
||||
self.doubleText:setText("+" .. tostring(reward.num * 2))
|
||||
GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 20)
|
||||
GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5)
|
||||
self.doubleOriginText:setText(reward.num)
|
||||
self.doubleOriginLine:setVisible(true)
|
||||
else
|
||||
|
||||
@ -34,7 +34,7 @@ function GoldCell:refresh(id, cfgInfo)
|
||||
local adLeftCount = adMaxTimes - bought
|
||||
if adLeftCount > 0 then
|
||||
self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 20)
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 5)
|
||||
self.sellOutText:setVisible(false)
|
||||
|
||||
self:getBaseObject():addRedPoint(105, 150, 0.6)
|
||||
@ -49,7 +49,7 @@ function GoldCell:refresh(id, cfgInfo)
|
||||
self.costNode:setVisible(true)
|
||||
|
||||
self.costText:setText(tostring(cost.num))
|
||||
GFunc.centerImgAndTx(self.costImg, self.costText, 20)
|
||||
GFunc.centerImgAndTx(self.costImg, self.costText, 5)
|
||||
self.sellOutText:setVisible(false)
|
||||
end
|
||||
self.nameText:setText(GFunc.num2Str(goldNum))
|
||||
|
||||
@ -58,7 +58,7 @@ function HotCell:refresh(data)
|
||||
local adLeftCount = DataManager.ShopData:getMallDailyFirstItemAdMaxCount() - bought
|
||||
if adLeftCount > 0 then
|
||||
self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 20)
|
||||
GFunc.centerImgAndTx(self.adImg, self.adText, 5)
|
||||
self.sellOutText:setVisible(false)
|
||||
|
||||
self:getBaseObject():addRedPoint(105, 150, 0.6)
|
||||
@ -76,7 +76,7 @@ function HotCell:refresh(data)
|
||||
if leftCount > 0 then
|
||||
self.costImg:setSprite(GFunc.getIconRes(cost.id))
|
||||
self.costText:setText(cost.num)
|
||||
GFunc.centerImgAndTx(self.costImg, self.costText, 20)
|
||||
GFunc.centerImgAndTx(self.costImg, self.costText, 5)
|
||||
self.sellOutText:setVisible(false)
|
||||
else
|
||||
self.costNode:setVisible(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user