added lable to select subcat, replaced getglobal with _G

This commit is contained in:
Anch
2022-08-12 20:24:29 +12:00
parent 5012902cd0
commit 3012622755
9 changed files with 112 additions and 108 deletions
+29 -29
View File
@@ -253,13 +253,13 @@ function AtlasLoot:OnEnable()
else
collectgarbage("collect");
end
panel = getglobal("AtlasLootOptionsFrame");
panel = _G["AtlasLootOptionsFrame"];
panel.name=AL["AtlasLoot"];
InterfaceOptions_AddCategory(panel);
--Filter and wishlist options menus creates as part of the next 2 commands
AtlasLoot_CreateFilterOptions();
AtlasLoot_CreateWishlistOptions();
panel = getglobal("AtlasLootHelpFrame");
panel = _G["AtlasLootHelpFrame"];
panel.name=AL["Help"];
panel.parent=AL["AtlasLoot"];
InterfaceOptions_AddCategory(panel);
@@ -500,16 +500,16 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
--For stopping the subtable from changing if its a token table
if dataSource[dataID].NoSubt == nil and dataID ~= "FilterList" then
AtlasLootDefaultFrame_SubMenu:SetText(dataSource[dataID].Name);
AtlasLootDefaultFrame_SubMenuText:SetText(dataSource[dataID].Name);
AtlasLoot:SubTableScrollFrameUpdate(dataID, dataSource, tablenum);
end
--Hide UI objects so that only needed ones are shown
for i = 1, 30, 1 do
getglobal("AtlasLootItem_"..i.."_Unsafe"):Hide();
getglobal("AtlasLootItem_"..i):Hide();
getglobal("AtlasLootItem_"..i).itemID = 0;
getglobal("AtlasLootItem_"..i).spellitemID = 0;
_G["AtlasLootItem_"..i.."_Unsafe"]:Hide();
_G["AtlasLootItem_"..i]:Hide();
_G["AtlasLootItem_"..i].itemID = 0;
_G["AtlasLootItem_"..i].spellitemID = 0;
end
local function getProperItemConditionals(item)
@@ -612,10 +612,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
extra = AtlasLoot_FixText(extra);
--Use shortcuts for easier reference to parts of the item button
itemButton = getglobal("AtlasLootItem_"..dataSource[dataID][tablenum][i][1]);
iconFrame = getglobal("AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Icon");
nameFrame = getglobal("AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Name");
extraFrame = getglobal("AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Extra");
itemButton = _G["AtlasLootItem_"..dataSource[dataID][tablenum][i][1]];
iconFrame = _G["AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Icon"];
nameFrame = _G["AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Name"];
extraFrame = _G["AtlasLootItem_"..dataSource[dataID][tablenum][i][1].."_Extra"];
--If there is no data on the texture an item should have, show a big red question mark
if dataSource[dataID][tablenum][i][3] == "?" then
@@ -706,13 +706,13 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
itemButton.i = 1;
itemButton:Show();
if IDfound == 0 then getglobal("AtlasLootItem_"..i.."_Unsafe"):Hide(); end
if IDfound == 0 then _G["AtlasLootItem_"..i.."_Unsafe"]:Hide(); end
end
end
AtlasLootItemsFrame.refresh = {dataID, dataSource, tablenum};
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true and dataID ~= "EmptyTable" then
AtlasLootItemsFrame.refreshOri = {dataID, dataSource, tablenum};
AtlasLoot.db.profile.LastBoss = {dataID, dataSource, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE] = {dataID, dataSource, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
@@ -739,27 +739,27 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
end
--Hide navigation buttons by default, only show what we need
getglobal("AtlasLootItemsFrame_BACK"):Hide();
getglobal("AtlasLootItemsFrame_NEXT"):Hide();
getglobal("AtlasLootItemsFrame_PREV"):Hide();
_G["AtlasLootItemsFrame_BACK"]:Hide();
_G["AtlasLootItemsFrame_NEXT"]:Hide();
_G["AtlasLootItemsFrame_PREV"]:Hide();
local tablebase = {dataID, dataSource};
if dataID == "FilterList" then
tablebase = {AtlasLootItemsFrame.refreshOri[1],AtlasLootItemsFrame.refreshOri[2]};
tablenum = AtlasLootItemsFrame.refreshOri[3];
end
if tablenum ~= #tablebase[2][tablebase[1]] then
getglobal("AtlasLootItemsFrame_NEXT"):Show();
getglobal("AtlasLootItemsFrame_NEXT").tablenum = tablenum + 1;
getglobal("AtlasLootItemsFrame_NEXT").tablebase = tablebase;
_G["AtlasLootItemsFrame_NEXT"]:Show();
_G["AtlasLootItemsFrame_NEXT"].tablenum = tablenum + 1;
_G["AtlasLootItemsFrame_NEXT"].tablebase = tablebase;
end
if tablenum ~= 1 then
getglobal("AtlasLootItemsFrame_PREV"):Show();
getglobal("AtlasLootItemsFrame_PREV").tablenum = tablenum - 1;
getglobal("AtlasLootItemsFrame_PREV").tablebase = tablebase;
_G["AtlasLootItemsFrame_PREV"]:Show();
_G["AtlasLootItemsFrame_PREV"].tablenum = tablenum - 1;
_G["AtlasLootItemsFrame_PREV"].tablebase = tablebase;
end
if dataSource[dataID].Back then
getglobal("AtlasLootItemsFrame_BACK"):Show();
_G["AtlasLootItemsFrame_BACK"]:Show();
end
end
@@ -949,9 +949,9 @@ function AtlasLoot:RefreshQuickLookButtons()
local i=1;
while i<5 do
if ((not AtlasLootCharDB["QuickLooks"][i]) or (not AtlasLootCharDB["QuickLooks"][i][1])) or (AtlasLootCharDB["QuickLooks"][i][1]==nil) then
getglobal("AtlasLootDefaultFrame_Preset"..i):Disable();
_G["AtlasLootDefaultFrame_Preset"..i]:Disable();
else
getglobal("AtlasLootDefaultFrame_Preset"..i):Enable();
_G["AtlasLootDefaultFrame_Preset"..i]:Enable();
end
i=i+1;
end
@@ -967,7 +967,7 @@ function AtlasLoot:QueryLootPage()
local function queryNextItem(pos)
if pos > MAX_BUTTONS then return end;
local button = getglobal("AtlasLootItem_"..pos);
local button = _G["AtlasLootItem_"..pos];
local queryitem = button.itemID;
if (queryitem) and (queryitem ~= nil) and (queryitem ~= "") and (queryitem ~= 0) and (string.sub(queryitem, 1, 1) ~= "s") then
@@ -999,14 +999,14 @@ Querys all valid items on the current loot page.
function AtlasLoot:QueryLootPageOLD()
local lastitem
for t = 1, 30, 1 do
local xbutton = getglobal("AtlasLootItem_"..t);
local xbutton = _G["AtlasLootItem_"..t];
local xqueryitem = xbutton.itemID;
if (xqueryitem) and (xqueryitem ~= nil) and (xqueryitem ~= "") and (xqueryitem ~= 0) and (string.sub(xqueryitem, 1, 1) ~= "s") then
lastitem = t;
end
end
for i = 1, 30, 1 do
local button = getglobal("AtlasLootItem_"..i);
local button = _G["AtlasLootItem_"..i];
local queryitem = button.itemID;
if (queryitem) and (queryitem ~= nil) and (queryitem ~= "") and (queryitem ~= 0) and (string.sub(queryitem, 1, 1) ~= "s") then
local item = Item:CreateFromID(queryitem);
@@ -1027,7 +1027,7 @@ Adds explanatory tooltips to UI objects.
]]
function AtlasLoot:AddTooltip(frameb, tooltiptext)
if not tooltiptext or not frameb then return end
local frame = getglobal(frameb)
local frame = _G[frameb]
frame:SetScript("OnEnter", function()
GameTooltip:SetOwner(frame, "ANCHOR_RIGHT")
GameTooltip:SetText(tooltiptext)
+7 -7
View File
@@ -40,16 +40,16 @@ function AtlasLoot:MapOnShow()
-- Hide the Filter Check-Box
AtlasLootFilterCheck:Hide();
--Hide navigation buttons by default, only show what we need
getglobal("AtlasLootItemsFrame_BACK"):Hide();
getglobal("AtlasLootItemsFrame_NEXT"):Hide();
getglobal("AtlasLootItemsFrame_PREV"):Hide();
_G["AtlasLootItemsFrame_BACK"]:Hide();
_G["AtlasLootItemsFrame_NEXT"]:Hide();
_G["AtlasLootItemsFrame_PREV"]:Hide();
AtlasLootDefaultFrame_LootBackground:Hide();
--Hide UI objects so that only needed ones are shown
for i = 1, 30, 1 do
getglobal("AtlasLootItem_"..i.."_Unsafe"):Hide();
getglobal("AtlasLootItem_"..i):Hide();
getglobal("AtlasLootItem_"..i).itemID = 0;
getglobal("AtlasLootItem_"..i).spellitemID = 0;
_G["AtlasLootItem_"..i.."_Unsafe"]:Hide();
_G["AtlasLootItem_"..i]:Hide();
_G["AtlasLootItem_"..i].itemID = 0;
_G["AtlasLootItem_"..i].spellitemID = 0;
end
AtlasLootDefaultFrame_Map:Show();
Atlasloot_HeaderLabel:Show();
+6 -6
View File
@@ -115,21 +115,21 @@ function AtlasLoot:HideNoUsableItems()
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
local info = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
if getglobal("AtlasLootItem_"..i):IsShown() then
local info = _G["AtlasLootItem_"..i.."_Extra"]:GetText()
if _G["AtlasLootItem_"..i]:IsShown() then
local xgo = true
local countOld = count
itemCount = itemCount + 1
countAll = countAll + count
count = 0
local xitemID = getglobal("AtlasLootItem_"..i).itemID
local xspellitemID = getglobal("AtlasLootItem_"..i).spellitemID
local xitemID = _G["AtlasLootItem_"..i].itemID
local xspellitemID = _G["AtlasLootItem_"..i].spellitemID
local xitemTexture = tablebase[itemCount][3]
local xitemExtraText = AtlasLoot_FixText(tablebase[itemCount][5])
local xitemExtraTextSave = xitemExtraText
-- remove the "-"
xitemExtraText = gsub(xitemExtraText, "-", "")
local xitemNameText = getglobal("AtlasLootItem_"..i.."_Name"):GetText()
local xitemNameText = _G["AtlasLootItem_"..i.."_Name"]:GetText()
if xitemExtraText and xitemExtraText ~= "" then
for k = 1,#FilterSort do
@@ -236,7 +236,7 @@ local function CreateCheckButton(parrent, text, num)
Check:SetWidth(25)
Check:SetHeight(25)
Check:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(BabbleInventory[text]);
_G[this:GetName().."Text"]:SetText(BabbleInventory[text]);
if AtlasLootFilterDB[num][text] then
this:SetChecked(1);
else
+14 -14
View File
@@ -19,7 +19,7 @@ function AtlasLoot_GetEnchantLink(enchantID)
AtlasLootScanTooltip:ClearLines();
AtlasLootScanTooltip:SetHyperlink("enchant:"..enchantID);
AtlasLootScanTooltip:Show()
local tooltipline = getglobal("AtlasLootScanTooltipTextLeft1")
local tooltipline = _G["AtlasLootScanTooltipTextLeft1"]
local text = tooltipline:GetText()
if text and string.find(text, ":") then
EnchantLink = "|cffffd000|Henchant:"..enchantID.."|h["..text.."]|h|r"
@@ -38,8 +38,8 @@ function AtlasLootItem_OnEnter(self)
local isItem;
AtlasLootTooltip:ClearLines();
for i=1, 30, 1 do
if (getglobal("AtlasLootTooltipTextRight"..i) ~= nil) then
getglobal("AtlasLootTooltipTextRight"..i):SetText("");
if (_G["AtlasLootTooltipTextRight"..i] ~= nil) then
_G["AtlasLootTooltipTextRight"..i]:SetText("");
end
end
if self.itemID and (self.itemID ~= 0) then
@@ -49,8 +49,8 @@ function AtlasLootItem_OnEnter(self)
isItem = true;
end
if isItem then
local color = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 3, 10);
local name = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11);
local color = strsub(_G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(), 3, 10);
local name = strsub(_G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(), 11);
if(self.itemID ~= 0 and self.itemID ~= "" and self.itemID ~= nil and AtlasLootDKPValues and AtlasLootClassPriority) then
Identifier = "Item"..self.itemID;
DKP = AtlasLootDKPValues[Identifier];
@@ -63,7 +63,7 @@ function AtlasLootItem_OnEnter(self)
if( AtlasLoot.db.profile.LootlinkTT ) then
--If we have seen the item, use the game tooltip to minimise same name item problems
if(GetItemInfo(self.itemID) ~= nil) then
getglobal(self:GetName().."_Unsafe"):Hide();
_G[self:GetName().."_Unsafe"]:Hide();
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
AtlasLootTooltip:SetHyperlink("item:"..self.itemID..":0:0:0");
if ( AtlasLoot.db.profile.ItemIDs ) then
@@ -86,12 +86,12 @@ function AtlasLootItem_OnEnter(self)
LootLink_AddItem(name, self.itemID..":0:0:0", color);
end
else
getglobal(self:GetName().."_Unsafe"):Show();
_G[self:GetName().."_Unsafe"]:Show();
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
if (LootLink_Database and LootLink_Database[self.itemID]) then
LootLink_SetTooltip(AtlasLootTooltip, LootLink_Database[self.itemID][1], 1);
else
LootLink_SetTooltip(AtlasLootTooltip,strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11), 1);
LootLink_SetTooltip(AtlasLootTooltip,strsub(_G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(), 11), 1);
end
if ( AtlasLoot.db.profile.ItemIDs ) then
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
@@ -112,7 +112,7 @@ function AtlasLootItem_OnEnter(self)
--Item Sync tooltips
elseif( AtlasLoot.db.profile.ItemSyncTT ) then
if(GetItemInfo(self.itemID) ~= nil) then
getglobal(self:GetName().."_Unsafe"):Hide();
_G[self:GetName().."_Unsafe"]:Hide();
end
ItemSync:ButtonEnter();
if ( AtlasLoot.db.profile.ItemIDs ) then
@@ -135,7 +135,7 @@ function AtlasLootItem_OnEnter(self)
else
if(self.itemID ~= nil) then
if(GetItemInfo(self.itemID) ~= nil) then
getglobal(self:GetName().."_Unsafe"):Hide();
_G[self:GetName().."_Unsafe"]:Hide();
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
AtlasLootTooltip:SetHyperlink("item:"..self.itemID..":0:0:0");
if ( AtlasLoot.db.profile.ItemIDs ) then
@@ -209,9 +209,9 @@ end
--------------------------------------------------------------------------------
function AtlasLootItem_OnClick(self ,arg1)
local isItem;
local color = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 1, 10);
local color = strsub(_G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(), 1, 10);
local id = self:GetID();
local name = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11);
local name = strsub(_G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(), 11);
if string.sub(self.itemID, 1, 1) == "s" then
isItem = false;
else
@@ -245,10 +245,10 @@ function AtlasLootItem_OnClick(self ,arg1)
else
if(AtlasLootItemsFrame.refresh[1] == "SearchResult") then
local datID, _, datPage = strsplit("|", self.sourcePage);
AtlasLoot_ShowWishListDropDown(self.itemID, self.itemTexture, getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(),
AtlasLoot_ShowWishListDropDown(self.itemID, self.itemTexture, _G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(),
AtlasLoot_Data[datID][tonumber(datPage)].Name, self.sourcePage, self);
else
AtlasLoot_ShowWishListDropDown(self.itemID, self.itemTexture, getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(),
AtlasLoot_ShowWishListDropDown(self.itemID, self.itemTexture, _G["AtlasLootItem_"..self:GetID().."_Name"]:GetText(),
AtlasLoot_BossName:GetText(), self.dataID .. "|" .. "AtlasLoot_Data" .. "|" .. tostring(self.tablenum), self);
end
end
+5 -5
View File
@@ -121,10 +121,10 @@ function AtlasLootOptions_ItemIDToggle()
end
function AtlasLoot_SetupLootBrowserSlider(frame, mymin, mymax, step)
getglobal(frame:GetName().."Text"):SetText(AL["Loot Browser Scale: "].." ("..frame:GetValue()..")");
_G[frame:GetName().."Text"]:SetText(AL["Loot Browser Scale: "].." ("..frame:GetValue()..")");
frame:SetMinMaxValues(mymin, mymax);
getglobal(frame:GetName().."Low"):SetText(mymin);
getglobal(frame:GetName().."High"):SetText(mymax);
_G[frame:GetName().."Low"]:SetText(mymin);
_G[frame:GetName().."High"]:SetText(mymax);
frame:SetValueStep(step);
end
@@ -135,7 +135,7 @@ local function round(num, idp)
end
function AtlasLoot_UpdateLootBrowserSlider(frame)
getglobal(frame:GetName().."Text"):SetText(AL["Loot Browser Scale: "].." ("..round(frame:GetValue(),2)..")");
_G[frame:GetName().."Text"]:SetText(AL["Loot Browser Scale: "].." ("..round(frame:GetValue(),2)..")");
end
function AtlasLoot_UpdateLootBrowserScale()
@@ -143,7 +143,7 @@ function AtlasLoot_UpdateLootBrowserScale()
end
function AtlasLoot_DisplayHelp()
if not getglobal("AtlasLootHelpFrame_HelpText") then
if not _G["AtlasLootHelpFrame_HelpText"] then
local framewidht = InterfaceOptionsFramePanelContainer:GetWidth()
local panel3 = CreateFrame("ScrollFrame", "AtlasLootHelpFrame_HelpTextFrameScroll", AtlasLootHelpFrame, "UIPanelScrollFrameTemplate")
local scc = CreateFrame("Frame", "AtlasLootHelpFrame_HelpTextFrame", panel3)
+25 -25
View File
@@ -206,9 +206,9 @@ function AtlasLoot_AdvancedSearchShow()
end
-- Hide all elements that could be in the AtlasTable
getglobal("AtlasLootItemsFrame_NEXT"):Hide();
getglobal("AtlasLootItemsFrame_PREV"):Hide();
getglobal("AtlasLootItemsFrame_BACK"):Hide();
_G["AtlasLootItemsFrame_NEXT"]:Hide();
_G["AtlasLootItemsFrame_PREV"]:Hide();
_G["AtlasLootItemsFrame_BACK"]:Hide();
-- Ditch the Quicklook selector
AtlasLootQuickLooksButton:Hide();
@@ -217,10 +217,10 @@ function AtlasLoot_AdvancedSearchShow()
AtlasLootFilterCheck:Hide();
for i = 1, 30, 1 do
getglobal("AtlasLootItem_" .. i .. "_Unsafe"):Hide();
getglobal("AtlasLootItem_" .. i):Hide();
getglobal("AtlasLootItem_" .. i).itemID = 0;
getglobal("AtlasLootItem_" .. i).spellitemID = 0;
_G["AtlasLootItem_" .. i .. "_Unsafe"]:Hide();
_G["AtlasLootItem_" .. i]:Hide();
_G["AtlasLootItem_" .. i].itemID = 0;
_G["AtlasLootItem_" .. i].spellitemID = 0;
end
AtlasLoot_BossName:SetText("Advanced Search");
@@ -328,27 +328,27 @@ function AtlasLoot_AdvancedSearchMenuClick(Object, VariableToSet, VariableValue,
if (ChildMenu ~= nil) then
if (ChildMenuRegister == "Disable") then
AtlasLoot_AdvSearchOptions[AtlasLoot_FrameMenuList[ChildMenu][4]] = AtlasLoot_FrameMenuList[ChildMenu][5];
getglobal(AtlasLoot_FrameMenuList[ChildMenu][2]):Disable();
_G[AtlasLoot_FrameMenuList[ChildMenu][2]]:Disable();
-- Disable assigned children menus as well
if (AtlasLoot_FrameMenuList[ChildMenu][6]) then
getglobal(AtlasLoot_FrameMenuList[ChildMenu][6]):Disable();
_G[AtlasLoot_FrameMenuList[ChildMenu][6]]:Disable();
end
if VariableValue == "reset" then
AtlasLoot_AdvSearchOptions[VariableToSet] = "";
Object[1]:SetText(AtlasLoot_AdvSearchDefaultText[VariableToSet]);
Object[2]:Close();
getglobal(AtlasLoot_FrameMenuList[ChildMenu][2]):SetText(AtlasLoot_FrameMenuList[ChildMenu][3])
_G[AtlasLoot_FrameMenuList[ChildMenu][2]]:SetText(AtlasLoot_FrameMenuList[ChildMenu][3])
return
end
else
AtlasLoot_AdvancedSearchRegister(AtlasLoot_FrameMenuList[ChildMenu][1], getglobal(AtlasLoot_FrameMenuList[ChildMenu][2]), AtlasLoot_AdvancedSearchMenus[ChildMenuRegister]);
AtlasLoot_AdvancedSearchRegister(AtlasLoot_FrameMenuList[ChildMenu][1], _G[AtlasLoot_FrameMenuList[ChildMenu][2]], AtlasLoot_AdvancedSearchMenus[ChildMenuRegister]);
AtlasLoot_AdvSearchOptions[AtlasLoot_FrameMenuList[ChildMenu][4]] = AtlasLoot_FrameMenuList[ChildMenu][5];
getglobal(AtlasLoot_FrameMenuList[ChildMenu][2]):Enable();
getglobal(AtlasLoot_FrameMenuList[ChildMenu][2]):SetText(AtlasLoot_FrameMenuList[ChildMenu][3]);
_G[AtlasLoot_FrameMenuList[ChildMenu][2]]:Enable();
_G[AtlasLoot_FrameMenuList[ChildMenu][2]]:SetText(AtlasLoot_FrameMenuList[ChildMenu][3]);
-- Disable assigned children menus as well
if (AtlasLoot_FrameMenuList[ChildMenu][6]) then
getglobal(AtlasLoot_FrameMenuList[ChildMenu][6]):Disable();
_G[AtlasLoot_FrameMenuList[ChildMenu][6]]:Disable();
end
end
end
@@ -407,24 +407,24 @@ function AtlasLoot_AdvancedSearchArgumentClick(Object, VariableToSet, VariableVa
if IsOperator and VariableValue == "reset" then
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet .. "op"] = "";
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):SetText("");
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):Hide();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:SetText("");
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:Hide();
Object[1]:SetText("Select Option");
Object[2]:Close();
elseif IsOperator then
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet .. "op"] = VariableValue;
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):Show();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:Show();
Object[1]:SetText(Object[3]);
Object[2]:Close();
elseif VariableValue == "reset" then
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"):SetText("Select Option");
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"):Disable();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"]:SetText("Select Option");
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"]:Disable();
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):SetText("");
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):Hide();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:SetText("");
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:Hide();
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet] = "";
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet .. "op"] = "";
@@ -432,12 +432,12 @@ function AtlasLoot_AdvancedSearchArgumentClick(Object, VariableToSet, VariableVa
Object[1]:SetText("Select Option");
Object[2]:Close();
else
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"):SetText("Select Option");
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"):Enable();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"]:SetText("Select Option");
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Sub"]:Enable();
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet .. "op"] = "";
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):SetText("");
getglobal("AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"):Hide();
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:SetText("");
_G["AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. VariableToSet .. "Value"]:Hide();
AtlasLoot_AdvSearchOptions["arg" .. VariableToSet] = VariableValue;
Object[1]:SetText(Object[3]);
+7 -7
View File
@@ -1338,7 +1338,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListMark:SetWidth(25)
WishListMark:SetHeight(25)
WishListMark:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Mark items in loot tables"]);
_G[this:GetName().."Text"]:SetText(AL["Mark items in loot tables"]);
if AtlasLootWishList["Options"][playerName]["Mark"] then
this:SetChecked(1);
else
@@ -1364,7 +1364,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListMarkOwn:SetWidth(25)
WishListMarkOwn:SetHeight(25)
WishListMarkOwn:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Mark items from own Wishlist"]);
_G[this:GetName().."Text"]:SetText(AL["Mark items from own Wishlist"]);
if AtlasLootWishList["Options"][playerName]["markInTable"] == "own" then
this:SetChecked(1);
else
@@ -1386,7 +1386,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListMarkAll:SetWidth(25)
WishListMarkAll:SetHeight(25)
WishListMarkAll:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Mark items from all Wishlists"]);
_G[this:GetName().."Text"]:SetText(AL["Mark items from all Wishlists"]);
if AtlasLootWishList["Options"][playerName]["markInTable"] == "all" then
this:SetChecked(1);
else
@@ -1408,7 +1408,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListShare:SetWidth(25)
WishListShare:SetHeight(25)
WishListShare:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Enable Wishlist Sharing"]);
_G[this:GetName().."Text"]:SetText(AL["Enable Wishlist Sharing"]);
if AtlasLootWishList["Options"][playerName]["AllowShareWishlist"] then
this:SetChecked(1);
else
@@ -1430,7 +1430,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListShareInCombat:SetWidth(25)
WishListShareInCombat:SetHeight(25)
WishListShareInCombat:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Auto reject in combat"]);
_G[this:GetName().."Text"]:SetText(AL["Auto reject in combat"]);
if AtlasLootWishList["Options"][playerName]["AllowShareWishlistInCombat"] then
this:SetChecked(1);
else
@@ -1450,7 +1450,7 @@ function AtlasLoot_CreateWishlistOptions()
WishListAutoAdd:SetWidth(25)
WishListAutoAdd:SetHeight(25)
WishListAutoAdd:SetScript("OnShow", function()
getglobal(this:GetName().."Text"):SetText(AL["Always use default Wishlist"]);
_G[this:GetName().."Text"]:SetText(AL["Always use default Wishlist"]);
if AtlasLootWishList["Options"][playerName]["UseDefaultWishlist"] == true then
this:SetChecked(1);
else
@@ -1699,7 +1699,7 @@ StaticPopupDialogs["ATLASLOOT_SEND_WISHLIST"] = {
this:SetFrameStrata("TOOLTIP");
end,
OnAccept = function()
local name = getglobal(this:GetParent():GetName().."EditBox"):GetText()
local name = _G[this:GetParent():GetName().."EditBox"]:GetText()
if string.lower(name) == string.lower(playerName) then
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..RED..AL["You can't send Wishlists to yourself."]);
curtabname = ""
@@ -84,7 +84,7 @@ function AtlasLoot:DewDropClick(tablename, text, tablenum)
if lasttable then
AtlasLoot:ShowItemsFrame(lasttable[1], lasttable[2], lasttable[3]);
else
AtlasLoot:DewDropSubMenuClick(AtlasLoot_SubMenus[tablename][tablenum][2])
AtlasLoot:ShowItemsFrame(AtlasLoot_SubMenus[tablename][tablenum][2], AtlasLoot_Data, tablenum);
end
AtlasLoot_Dewdrop:Close(1);
end
@@ -318,15 +318,15 @@ function AtlasLoot:SetNewStyle(style)
AtlasLootDefaultFrame_Options:SetHeight(24)
local function SetButtons(path)
getglobal(path):SetNormalTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
getglobal(path):SetHeight(24)
getglobal(path):SetPushedTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
getglobal(path):SetHeight(24)
local tex = getglobal(path):GetNormalTexture();
_G[path]:SetNormalTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
_G[path]:SetHeight(24)
_G[path]:SetPushedTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
_G[path]:SetHeight(24)
local tex = _G[path]:GetNormalTexture();
tex:SetTexCoord(0, 0.6640625, 0, 0.8);
tex:SetHeight(32)
local tex2 = getglobal(path):GetPushedTexture();
local tex2 = _G[path]:GetPushedTexture();
tex2:SetTexCoord(0, 0.6640625, 0, 0.8);
tex2:SetHeight(32)
end
@@ -359,15 +359,15 @@ function AtlasLoot:SetNewStyle(style)
AtlasLootDefaultFrame_Options:SetHeight(20)
local function SetButtons(path)
getglobal(path):SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
getglobal(path):SetHeight(20)
getglobal(path):SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
getglobal(path):SetHeight(20)
local tex = getglobal(path):GetNormalTexture();
_G[path]:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
_G[path]:SetHeight(20)
_G[path]:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
_G[path]:SetHeight(20)
local tex = _G[path]:GetNormalTexture();
tex:SetTexCoord(0, 0.625, 0, 0.6875);
tex:SetHeight(20)
local tex2 = getglobal(path):GetPushedTexture();
local tex2 = _G[path]:GetPushedTexture();
tex2:SetTexCoord(0, 0.625, 0, 0.6875);
tex2:SetHeight(20)
end
@@ -246,10 +246,14 @@ local submenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_SubMenu", AtlasL
submenubtn:SetSize(200,25);
submenubtn:SetPoint("LEFT", "AtlasLootDefaultFrame_Menu", "RIGHT",0,0);
submenubtn.Lable = submenubtn:CreateFontString("AtlasLootDefaultFrame_SelectedTable", "OVERLAY","GameFontNormal")
submenubtn.Lable:SetPoint("TOP",submenubtn,"BOTTOM",0,37);
submenubtn.Lable:SetPoint("TOP","AtlasLootDefaultFrame_SubMenu","BOTTOM",0,37);
submenubtn.Lable:SetText("Select Subcategory");
submenubtn.Lable:Show();
submenubtn:SetText(AL["Select Sub-Table"]);
submenubtn.Text = submenubtn:CreateFontString("AtlasLootDefaultFrame_SubMenuText", "OVERLAY","GameFontNormal")
submenubtn.Text:SetPoint("LEFT","AtlasLootDefaultFrame_SubMenu","RIGHT",0,0);
submenubtn.Text:SetJustifyH("CENTER");
submenubtn.Text:SetSize(190,25);
submenubtn.Text:Show();
submenubtn:SetScript("OnClick", function(self)
if AtlasLoot_DewdropSubMenu:IsOpen() then
AtlasLoot_DewdropSubMenu:Close();