Skip to content

Commit

Permalink
a few corrections to scrollframe
Browse files Browse the repository at this point in the history
  • Loading branch information
solidity0815 committed Mar 26, 2022
1 parent 56bc65c commit 3706122
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ function f:ShowData()
for itemkey, itemvalue in pairs(itemTable) do
local itemName = scrollChild:CreateFontString(scrollChild, "ARTWORK", "GameFontNormal")
itemName:SetPoint("TOPLEFT", 20, -20-n*yOffset)
itemName:SetText(itemkey)
if (itemvalue.itemlvl>25) then
itemName:SetText(itemvalue.itemlink.." ("..itemvalue.itemlvl..")")
else
itemName:SetText(itemvalue.itemlink)
end
n = n + 1
end
end
Expand All @@ -246,12 +250,14 @@ function GetDistinctItems()
local t = {}
for datekey, datevalue in pairs(CraftLog) do
for itemkey, itemvalue in pairs(datevalue) do
if (t[itemkey] == nil) then t[itemkey] = {} end
--if (t[itemkey] == nil) then t[itemkey] = {} end
for ilvlkey, ilvlvalue in pairs(itemvalue) do
if(t[itemkey][ilvlkey] == nil) then t[itemkey][ilvlkey] = ilvlvalue end
--if(t[itemkey][ilvlkey] == nil) then t[itemkey][ilvlkey] = ilvlvalue end
table.insert(t, {itemlink=itemkey, itemlvl=ilvlkey})
end
end
end
table.sort(t, function(a,b) return a.itemlink<b.itemlink end)
return t
end

Expand Down

0 comments on commit 3706122

Please sign in to comment.