|
end |
--If theres a progress bar, theres no other achievements |
break |
end |
if month then |
self.frame.display.criteriaButtons[buttonNum].date = string.format(SHORTDATE, day, month, year); |
--break |
local buttonNumCurrent |
local buttonNumEnd = buttonNum+2 |
for buttonNumCurrent=buttonNum, buttonNumEnd, 1 do |
self.frame.display.criteriaButtons[buttonNumCurrent].icon:Hide() |
self.frame.display.criteriaButtons[buttonNumCurrent].date = nil |
self.frame.display.criteriaButtons[buttonNumCurrent].id = nil |
self.frame.display.criteriaButtons[buttonNumCurrent].text:SetText('') |
self.frame.display.criteriaButtons[buttonNumCurrent].offset:SetWidth(1) |
end |
buttonNum = buttonNumEnd+1 |
else |
self.frame.display.criteriaButtons[buttonNum].date = nil; |
if month then |
self.frame.display.criteriaButtons[buttonNum].date = string.format(SHORTDATE, day, month, year); |
else |
self.frame.display.criteriaButtons[buttonNum].date = nil; |
end |
if id then |
self.frame.display.criteriaButtons[buttonNum].id = id; |
else |
self.frame.display.criteriaButtons[buttonNum].id = nil; |
end |
self.frame.display.criteriaButtons[buttonNum].text:SetText(str) |
self.frame.display.criteriaButtons[buttonNum].offset:SetWidth(offset) |
buttonNum = buttonNum + 1 |
end |
if id then |
self.frame.display.criteriaButtons[buttonNum].id = id; |
else |
self.frame.display.criteriaButtons[buttonNum].id = nil; |
end |
self.frame.display.criteriaButtons[buttonNum].text:SetText(str) |
self.frame.display.criteriaButtons[buttonNum].offset:SetWidth(offset) |
buttonNum = buttonNum + 1 |
end |
end |
self.frame.criteriaScroll:SetMinMaxValues(0,math.max(GetAchievementNumCriteria(self.currentAch)-#self.frame.display.criteriaButtons, 0)) |