diff --git a/lua/app/ui/shop/box_hero_ui.lua b/lua/app/ui/shop/box_hero_ui.lua index 416f21a0..5e12fde3 100644 --- a/lua/app/ui/shop/box_hero_ui.lua +++ b/lua/app/ui/shop/box_hero_ui.lua @@ -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() diff --git a/lua/app/ui/shop/box_reward_ui.lua b/lua/app/ui/shop/box_reward_ui.lua index 89e4ccfd..fa54609b 100644 --- a/lua/app/ui/shop/box_reward_ui.lua +++ b/lua/app/ui/shop/box_reward_ui.lua @@ -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 diff --git a/lua/app/ui/shop/cell/box_sell_cell.lua b/lua/app/ui/shop/cell/box_sell_cell.lua index 34f92578..4f9a90f9 100644 --- a/lua/app/ui/shop/cell/box_sell_cell.lua +++ b/lua/app/ui/shop/cell/box_sell_cell.lua @@ -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) diff --git a/lua/app/ui/shop/cell/gem_cell.lua b/lua/app/ui/shop/cell/gem_cell.lua index 34d1504d..4b9b146e 100644 --- a/lua/app/ui/shop/cell/gem_cell.lua +++ b/lua/app/ui/shop/cell/gem_cell.lua @@ -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 diff --git a/lua/app/ui/shop/cell/gold_cell.lua b/lua/app/ui/shop/cell/gold_cell.lua index 1408077c..995d99af 100644 --- a/lua/app/ui/shop/cell/gold_cell.lua +++ b/lua/app/ui/shop/cell/gold_cell.lua @@ -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)) diff --git a/lua/app/ui/shop/cell/hot_cell.lua b/lua/app/ui/shop/cell/hot_cell.lua index 38d6b254..35ddc775 100644 --- a/lua/app/ui/shop/cell/hot_cell.lua +++ b/lua/app/ui/shop/cell/hot_cell.lua @@ -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)