界面调整

This commit is contained in:
xiekaidong 2023-08-23 17:35:27 +08:00
parent 5ce54d479d
commit b2a829741b
3 changed files with 12 additions and 10 deletions

View File

@ -38,6 +38,8 @@ end
function HeroFundUI:_display() function HeroFundUI:_display()
local uiMap = self.root:genAllChildren() 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.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 = uiMap["activity_herofund_ui.bg.bg.desc"]
self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_3)) self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_3))
self.toActivityTx = uiMap["activity_herofund_ui.bg.bg.to_activity_tx"] 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 progSlider = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
local y = (totalCount - 1) * 120 local y = (totalCount - 1) * 120
if (level - 1) >= 0 then if (level - 1) >= 0 then
progSlider.value = (73 + ((level - 1) / (totalCount - 1)) * y) / (73 + y) progSlider.value = (level - 1) / (totalCount - 1)
else else
progSlider.value = 0 progSlider.value = 0
end end
@ -141,7 +143,7 @@ function HeroFundUI:_refreshScrollrect()
end end
local prog = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog"] 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 = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRectComp:addInitCallback(function() self.scrollRectComp:addInitCallback(function()
return FUND_CELL return FUND_CELL
@ -166,15 +168,15 @@ function HeroFundUI:refreshTime()
str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)
else else
str = Time:formatNumTimeStr(remainTime) str = Time:formatNumTimeStr(remainTime)
if remainTime <= 86400 then --最后一天 -- if remainTime <= 86400 then --最后一天 -- 14天活动未开不处理
self.toActivityTx:setVisible(true) -- self.toActivityTx:setVisible(true)
self.toActivityBtn:setActive(true) -- self.toActivityBtn:setActive(true)
self.downDesc:setVisible(false) -- self.downDesc:setVisible(false)
else -- else
self.toActivityTx:setVisible(false) self.toActivityTx:setVisible(false)
self.toActivityBtn:setActive(false) self.toActivityBtn:setActive(false)
self.downDesc:setVisible(true) self.downDesc:setVisible(true)
end -- end
end end
uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str) uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str)
end end

View File

@ -14,7 +14,7 @@ function SideBarHeroFundCell:getIsOpen()
end end
function SideBarHeroFundCell:getSpineName() function SideBarHeroFundCell:getSpineName()
return "ui_main_btn_sevenday" return "ui_main_herofund"
end end
function SideBarHeroFundCell:onClick() function SideBarHeroFundCell:onClick()

View File

@ -178,7 +178,7 @@ function HeroFundData:addWaveCount(count)
end end
function HeroFundData:getWaveCount() function HeroFundData:getWaveCount()
return self.waveCount return self.waveCount or 0
end end
function HeroFundData:getFreeGot(level) function HeroFundData:getFreeGot(level)