added new labe for maps fixed missing data point from filter

This commit is contained in:
Anch
2022-08-07 02:35:47 +12:00
parent 6f65167ab2
commit b72edb4a8d
3 changed files with 2339 additions and 2105 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -116,7 +116,7 @@ function AtlasLoot_HideNoUsableItems()
local count = 0 local count = 0
local leatherworking = GetSpellInfo(2108) local leatherworking = GetSpellInfo(2108)
AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; Name = dataSource[dataID].Name;[tablenum] = {Name = dataSource[dataID][tablenum].Name}; }; AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; Name = dataSource[dataID].Name;Map = dataSource[dataID].Map; [tablenum] = {Name = dataSource[dataID][tablenum].Name}; };
for i=1,30 do for i=1,30 do
local info = getglobal("AtlasLootItem_"..i.."_Extra"):GetText() local info = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
@@ -304,8 +304,12 @@ local scrollFrame = CreateFrame("Frame", "Atlasloot_Difficulty_ScrollFrame", Atl
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16, edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }, insets = { left = 4, right = 4, top = 4, bottom = 4 },
}); });
scrollFrame.Lable = scrollFrame:CreateFontString("Atlasloot_HeaderLabel", "OVERLAY","GameFontNormal")
scrollFrame.Lable:SetPoint("TOPLEFT",Atlasloot_Difficulty_ScrollFrame,10,-10);
scrollFrame.Lable:SetJustifyH("LEFT");
scrollFrame.Lable:SetFont("GameFontNormal", 24);
function AtlasLoot:ScrollFrameUpdate() function AtlasLoot:ScrollFrameUpdate(hide)
local maxValue = #AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE]; local maxValue = #AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE];
FauxScrollFrame_Update(scrollFrame.scrollBar, maxValue, MAX_ROWS, ROW_HEIGHT); FauxScrollFrame_Update(scrollFrame.scrollBar, maxValue, MAX_ROWS, ROW_HEIGHT);
local offset = FauxScrollFrame_GetOffset(scrollFrame.scrollBar); local offset = FauxScrollFrame_GetOffset(scrollFrame.scrollBar);
@@ -313,7 +317,7 @@ function AtlasLoot:ScrollFrameUpdate()
local value = i + offset local value = i + offset
scrollFrame.rows[i]:SetChecked(false); scrollFrame.rows[i]:SetChecked(false);
scrollFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); scrollFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
if value <= maxValue and AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value] then if value <= maxValue and AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value] and hide == nil then
local row = scrollFrame.rows[i] local row = scrollFrame.rows[i]
row:SetText("|cffFFd200"..AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][1]); row:SetText("|cffFFd200"..AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][1]);
row.itemIndex = AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][2]; row.itemIndex = AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][2];
@@ -343,8 +347,8 @@ scrollFrame.scrollBar = scrollSlider
local rows = setmetatable({}, { __index = function(t, i) local rows = setmetatable({}, { __index = function(t, i)
local row = CreateFrame("CheckButton", "$parentRow"..i, scrollFrame) local row = CreateFrame("CheckButton", "$parentRow"..i, scrollFrame)
row:SetSize(150, ROW_HEIGHT) row:SetSize(150, ROW_HEIGHT);
row:SetNormalFontObject(GameFontHighlightLeft) row:SetNormalFontObject(GameFontHighlightLeft);
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
row:SetScript("OnClick", function() row:SetScript("OnClick", function()
ItemindexID = row.itemIndex; ItemindexID = row.itemIndex;
@@ -377,9 +381,12 @@ local subtableFrame = CreateFrame("Frame", "Atlasloot_SubTableFrame", AtlasLootD
insets = { left = 4, right = 4, top = 4, bottom = 4 }, insets = { left = 4, right = 4, top = 4, bottom = 4 },
}); });
function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, currenttablenum) function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, tablenum)
local maxValue = #dataSource[tablename]; local maxValue = #dataSource[tablename];
subtableFrame.tablename = tablename; subtableFrame.tablename = tablename;
subtableFrame.dataSource = dataSource;
subtableFrame.tablenum = tablenum;
subtableFrame.pFrame = pFrame;
FauxScrollFrame_Update(subtableFrame.scrollBar, maxValue, MAX_ROWS2, ROW_HEIGHT); FauxScrollFrame_Update(subtableFrame.scrollBar, maxValue, MAX_ROWS2, ROW_HEIGHT);
local offset = FauxScrollFrame_GetOffset(subtableFrame.scrollBar); local offset = FauxScrollFrame_GetOffset(subtableFrame.scrollBar);
for i = 1, MAX_ROWS2 do for i = 1, MAX_ROWS2 do
@@ -396,7 +403,7 @@ function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, curr
row:SetText(string.sub(tostring(dataSource[tablename][value][1]),0,50)); row:SetText(string.sub(tostring(dataSource[tablename][value][1]),0,50));
else else
row:SetText("|cffFFd200"..dataSource[tablename][value].Name); row:SetText("|cffFFd200"..dataSource[tablename][value].Name);
if currenttablenum == value then if tablenum == value and dataSource ~= AtlasLoot_MapData then
row:SetChecked(true); row:SetChecked(true);
end end
end end
@@ -412,7 +419,7 @@ local scrollSlider2 = CreateFrame("ScrollFrame","AtlasLootDefaultFrameSubTableSc
scrollSlider2:SetPoint("BOTTOMRIGHT", -30, 8) scrollSlider2:SetPoint("BOTTOMRIGHT", -30, 8)
scrollSlider2:SetScript("OnVerticalScroll", function(self, offset) scrollSlider2:SetScript("OnVerticalScroll", function(self, offset)
self.offset = math.floor(offset / ROW_HEIGHT + 0.5) self.offset = math.floor(offset / ROW_HEIGHT + 0.5)
AtlasLoot:SubTableScrollFrameUpdate(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[4], AtlasLootItemsFrame.refresh[5]); AtlasLoot:SubTableScrollFrameUpdate(subtableFrame.tablename, subtableFrame.dataSource, subtableFrame.pFrame, subtableFrame.tablenum);
end) end)
subtableFrame.scrollBar = scrollSlider2 subtableFrame.scrollBar = scrollSlider2
@@ -423,8 +430,11 @@ local rows2 = setmetatable({}, { __index = function(t, i)
row:SetNormalFontObject(GameFontHighlightLeft) row:SetNormalFontObject(GameFontHighlightLeft)
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
row:SetScript("OnClick", function() row:SetScript("OnClick", function()
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; if row.dataSource ~= AtlasLoot_MapData then
AtlasLoot_ShowItemsFrame(row.tablename, row.dataSource, row.dataSource[row.tablename][row.tablenum].Name, pFrame, row.tablenum); AtlasLoot_ShowItemsFrame(row.tablename, row.dataSource, row.dataSource[row.tablename][row.tablenum].Name, row.pFrame, row.tablenum);
else
row:SetChecked(false);
end
end) end)
if i == 1 then if i == 1 then
row:SetPoint("TOPLEFT", subtableFrame, 8, -8) row:SetPoint("TOPLEFT", subtableFrame, 8, -8)