替换一波ui
This commit is contained in:
parent
9286537e65
commit
9194824490
@ -1,7 +1,7 @@
|
||||
local BoxSellCell = class("BoxSellCell", BaseCell)
|
||||
|
||||
local BASE_CELL_HEIGHT = 508
|
||||
local FULL_CELL_HEIGHT = 754
|
||||
local BASE_CELL_HEIGHT = 522
|
||||
local FULL_CELL_HEIGHT = 786
|
||||
local HEIGHT_ADD = 30
|
||||
|
||||
function BoxSellCell:init()
|
||||
@ -11,14 +11,14 @@ function BoxSellCell:init()
|
||||
boxNameTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1)) -- 普通宝箱
|
||||
local boxDescTx1 = uiMap["box_sell_cell.bg.box_1.desc_tx"]
|
||||
boxDescTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_24)) -- 必出<color=#5fff57>普通</color>英雄
|
||||
self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1.buy_btn"]
|
||||
self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1"]
|
||||
self.boxBuyBtnCoin1 = uiMap["box_sell_cell.bg.box_1.buy_btn.coin"]
|
||||
self.boxBuyBtnTx1 = uiMap["box_sell_cell.bg.box_1.buy_btn.buy_tx"]
|
||||
local boxNameTx2 = uiMap["box_sell_cell.bg.box_2.name_tx"]
|
||||
boxNameTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2)) -- 精致宝箱
|
||||
local boxDescTx2 = uiMap["box_sell_cell.bg.box_2.desc_tx"]
|
||||
boxDescTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_25)) -- 必出<color=#8aedff>稀有</color>英雄
|
||||
self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2.buy_btn"]
|
||||
self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2"]
|
||||
self.boxBuyBtnCoin2 = uiMap["box_sell_cell.bg.box_2.buy_btn.coin"]
|
||||
self.boxBuyBtnTx2 = uiMap["box_sell_cell.bg.box_2.buy_btn.buy_tx"]
|
||||
self.box3 = uiMap["box_sell_cell.bg.box_3"]
|
||||
@ -26,7 +26,7 @@ function BoxSellCell:init()
|
||||
boxNameTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3)) -- 珍贵宝箱
|
||||
local boxDescTx3 = uiMap["box_sell_cell.bg.box_3.desc_tx"]
|
||||
boxDescTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_26)) -- 必出<color=#ff8af0>史诗</color>英雄
|
||||
self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3.buy_btn"]
|
||||
self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3"]
|
||||
self.boxBuyBtnCoin3 = uiMap["box_sell_cell.bg.box_3.buy_btn.coin"]
|
||||
self.boxBuyBtnTx3 = uiMap["box_sell_cell.bg.box_3.buy_btn.buy_tx"]
|
||||
self.progressSlider = uiMap["box_sell_cell.bg.progress_slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||
@ -54,13 +54,15 @@ end
|
||||
|
||||
function BoxSellCell:refresh()
|
||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_3_OPEN, true) then -- 没解锁的话第三个宝箱不显示
|
||||
self.cellHeight = BASE_CELL_HEIGHT + 20
|
||||
self.cellHeight = BASE_CELL_HEIGHT + 70
|
||||
self.baseObject:setSizeDeltaY(BASE_CELL_HEIGHT)
|
||||
self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_10.png")
|
||||
self.bg:setSizeDeltaY(BASE_CELL_HEIGHT - HEIGHT_ADD)
|
||||
self.box3:setVisible(false)
|
||||
else
|
||||
self.cellHeight = FULL_CELL_HEIGHT + 20
|
||||
self.cellHeight = FULL_CELL_HEIGHT + 70
|
||||
self.baseObject:setSizeDeltaY(FULL_CELL_HEIGHT)
|
||||
self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_9.png")
|
||||
self.bg:setSizeDeltaY(FULL_CELL_HEIGHT - HEIGHT_ADD)
|
||||
self.box3:setVisible(true)
|
||||
end
|
||||
|
||||
@ -59,7 +59,7 @@ function GemCell:refresh(id, cfgInfo)
|
||||
self.doubleNode:setVisible(true)
|
||||
self.doubleDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, tostring(leftDoubleTimes))) -- 剩余次数:{0}
|
||||
self.doubleText:setText("+" .. tostring(reward.num * 2))
|
||||
GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5)
|
||||
-- GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5)
|
||||
self.doubleOriginText:setText(reward.num)
|
||||
self.doubleOriginLine:setVisible(true)
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user