for i = 1, 100 do |
self.data[i] = i; |
end |
|
self.gui:CheckList(); |
self.deathsScrollBar = RecorDeadParentFrameListContainerScrollBar; |
-- FauxScrollFrame_SetOffset(RecorDeadParentFrameListContainerScrollBar, 0); |
-- print(FauxScrollFrame_GetOffset(RecorDeadParentFrameListContainerScrollBar)); |
FauxScrollFrame_SetOffset(RecorDeadParentFrameListContainerScrollBar, 0); |
self.gui:CheckList(); |
end |
|
function RecorDead:UpdateDeathsListScrollBar() |
self = self or RecorDead; |
print("Offset before function call:", FauxScrollFrame_GetOffset(RecorDeadParentFrameListContainerScrollBar)); |
FauxScrollFrame_Update(RecorDeadParentFrameListContainerScrollBar, 100, #self.gui.listButtons, 16); |
print("Offset after function call:", FauxScrollFrame_GetOffset(RecorDeadParentFrameListContainerScrollBar)); |
|
local line; -- 1 through 5 of our window to scroll |
local lineplusoffset; -- an index into our data calculated from the scroll offset |
for line=1,#self.gui.listButtons do |
lineplusoffset = line + FauxScrollFrame_GetOffset(RecorDeadParentFrameListContainerScrollBar); |
print("lineplusoffset ", lineplusoffset) |
if lineplusoffset <= 100 then |
self.gui.listButtons[line].dateText:SetText(self.data[lineplusoffset]); |
self.gui.listButtons[line]:Show(); |