界面调整
This commit is contained in:
parent
5ce54d479d
commit
b2a829741b
@ -38,6 +38,8 @@ end
|
||||
function HeroFundUI:_display()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
uiMap["activity_herofund_ui.bg.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_2))
|
||||
uiMap["activity_herofund_ui.bg.ui_spine_obj"]:playAnim("idle", true, false)
|
||||
uiMap["activity_herofund_ui.bg.level.tx_level"]:setText(DataManager.HeroFundData:getWaveCount())
|
||||
self.downDesc = uiMap["activity_herofund_ui.bg.bg.desc"]
|
||||
self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_3))
|
||||
self.toActivityTx = uiMap["activity_herofund_ui.bg.bg.to_activity_tx"]
|
||||
@ -129,7 +131,7 @@ function HeroFundUI:_refreshScrollrect()
|
||||
local progSlider = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||
local y = (totalCount - 1) * 120
|
||||
if (level - 1) >= 0 then
|
||||
progSlider.value = (73 + ((level - 1) / (totalCount - 1)) * y) / (73 + y)
|
||||
progSlider.value = (level - 1) / (totalCount - 1)
|
||||
else
|
||||
progSlider.value = 0
|
||||
end
|
||||
@ -141,7 +143,7 @@ function HeroFundUI:_refreshScrollrect()
|
||||
end
|
||||
|
||||
local prog = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog"]
|
||||
prog:setSizeDeltaY(73 + y)
|
||||
prog:setSizeDeltaY(y)
|
||||
self.scrollRectComp = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
||||
self.scrollRectComp:addInitCallback(function()
|
||||
return FUND_CELL
|
||||
@ -166,15 +168,15 @@ function HeroFundUI:refreshTime()
|
||||
str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)
|
||||
else
|
||||
str = Time:formatNumTimeStr(remainTime)
|
||||
if remainTime <= 86400 then --最后一天
|
||||
self.toActivityTx:setVisible(true)
|
||||
self.toActivityBtn:setActive(true)
|
||||
self.downDesc:setVisible(false)
|
||||
else
|
||||
-- if remainTime <= 86400 then --最后一天 -- 14天活动未开,不处理
|
||||
-- self.toActivityTx:setVisible(true)
|
||||
-- self.toActivityBtn:setActive(true)
|
||||
-- self.downDesc:setVisible(false)
|
||||
-- else
|
||||
self.toActivityTx:setVisible(false)
|
||||
self.toActivityBtn:setActive(false)
|
||||
self.downDesc:setVisible(true)
|
||||
end
|
||||
-- end
|
||||
end
|
||||
uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str)
|
||||
end
|
||||
|
||||
@ -14,7 +14,7 @@ function SideBarHeroFundCell:getIsOpen()
|
||||
end
|
||||
|
||||
function SideBarHeroFundCell:getSpineName()
|
||||
return "ui_main_btn_sevenday"
|
||||
return "ui_main_herofund"
|
||||
end
|
||||
|
||||
function SideBarHeroFundCell:onClick()
|
||||
|
||||
@ -178,7 +178,7 @@ function HeroFundData:addWaveCount(count)
|
||||
end
|
||||
|
||||
function HeroFundData:getWaveCount()
|
||||
return self.waveCount
|
||||
return self.waveCount or 0
|
||||
end
|
||||
|
||||
function HeroFundData:getFreeGot(level)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user