七天乐天数没解锁的表现

This commit is contained in:
chenxi 2023-05-30 19:14:14 +08:00
parent 3121b7b59a
commit afc0b58e39

View File

@ -53,8 +53,10 @@ end
function SevenDayUI:initTop() function SevenDayUI:initTop()
self.dayTextList = {} self.dayTextList = {}
self.dayLockList = {}
self.stepObjs = {} self.stepObjs = {}
for i = 1, 7 do for i = 1, 7 do
self.dayLockList[i] = self.uiMap["seven_day_ui.day_bg.lock_" .. i]
self.dayTextList[i] = self.uiMap["seven_day_ui.day_bg.day_" .. i] self.dayTextList[i] = self.uiMap["seven_day_ui.day_bg.day_" .. i]
self.dayTextList[i]:setText(I18N:getGlobalText(I18N.GlobalConst.DAY_X, i)) self.dayTextList[i]:setText(I18N:getGlobalText(I18N.GlobalConst.DAY_X, i))
self.dayTextList[i]:addClickListener(function() self.dayTextList[i]:addClickListener(function()
@ -122,12 +124,18 @@ function SevenDayUI:refreshDay()
if i == self.day then if i == self.day then
self.daySelectImg:setAnchoredPositionX(self.dayTextList[i]:fastGetAnchoredPositionX()) self.daySelectImg:setAnchoredPositionX(self.dayTextList[i]:fastGetAnchoredPositionX())
end end
if DataManager.SevenDayData:showRedPoint(i) and i <= actDay then if i > actDay then
self.dayLockList[i]:setVisible(true)
self.dayTextList[i]:removeRedPoint()
else
self.dayLockList[i]:setVisible(false)
if DataManager.SevenDayData:showRedPoint(i) then
self.dayTextList[i]:addRedPoint(40, 26, 0.5) self.dayTextList[i]:addRedPoint(40, 26, 0.5)
else else
self.dayTextList[i]:removeRedPoint() self.dayTextList[i]:removeRedPoint()
end end
end end
end
end end
function SevenDayUI:refreshStepInfo() function SevenDayUI:refreshStepInfo()