七天乐天数没解锁的表现

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()
self.dayTextList = {}
self.dayLockList = {}
self.stepObjs = {}
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]:setText(I18N:getGlobalText(I18N.GlobalConst.DAY_X, i))
self.dayTextList[i]:addClickListener(function()
@ -122,10 +124,16 @@ function SevenDayUI:refreshDay()
if i == self.day then
self.daySelectImg:setAnchoredPositionX(self.dayTextList[i]:fastGetAnchoredPositionX())
end
if DataManager.SevenDayData:showRedPoint(i) and i <= actDay then
self.dayTextList[i]:addRedPoint(40, 26, 0.5)
else
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)
else
self.dayTextList[i]:removeRedPoint()
end
end
end
end