This commit is contained in:
Andrew6810
2022-10-21 06:29:32 -07:00
parent 5cca051e96
commit db2a2cc2ff
161 changed files with 147766 additions and 2 deletions
@@ -0,0 +1,282 @@
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
local MAX_ARGUMENTS = 6;
local framename = "AtlasLootDefaultFrame_AdvancedSearchPanel";
--Create Main Search Panel
local searchpanel = CreateFrame("FRAME", framename, AtlasLootDefaultFrame, nil);
searchpanel:SetPoint("TOPLEFT", AtlasLootDefaultFrame_LootBackground, "TOPLEFT", 2, -2);
searchpanel:SetSize(510, 510);
searchpanel.closebtn = CreateFrame("Button", framename.."_CloseButton", searchpanel, "UIPanelCloseButton");
searchpanel.closebtn:SetPoint("TOPRIGHT", searchpanel, "TOPRIGHT", -10, -10);
searchpanel:Hide();
searchpanel.closebtn:SetScript("OnClick", function() AtlasLoot_AdvancedSearchClose(); end);
searchpanel.closebtn:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
--Create search/name box
local searchbox = CreateFrame("EditBox", framename.."_SearchBox", searchpanel, "InputBoxTemplate");
searchbox:SetSize(265, 35);
searchbox:SetPoint("TOPLEFT", searchpanel, "TOPLEFT", 30, -55);
searchbox:SetMaxLetters(100);
searchbox:SetAutoFocus(false);
searchbox:SetTextInsets(0, 8, 0, 0);
searchbox.title = searchbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
searchbox.title:SetText("Name: ");
searchbox.title:SetPoint("TOPLEFT", searchbox, "TOPLEFT", -3, 8);
searchbox:SetScript("OnEnterPressed", function(self)
AtlasLoot:AdvancedSearch(AtlasLootDefaultFrame_AdvancedSearchPanel_SearchBox:GetText());
self:ClearFocus();
end);
searchbox:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
local searchbox_string = searchbox:CreateFontString(framename.."_SearchBoxString", "ARTWORK", "GameFontNormal");
--Create quality button
local qualitybtn = CreateFrame("Button", framename.."_QualityButton", searchpanel, "OptionsButtonTemplate");
qualitybtn:SetSize(130, 20);
qualitybtn:SetPoint("LEFT", searchbox, "RIGHT", 15, 0);
qualitybtn.title = qualitybtn:CreateFontString(nil, "ARTWORK", "GameFontNormal");
qualitybtn.title:SetText("Quality: ");
qualitybtn.title:SetPoint("TOPLEFT", qualitybtn, "TOPLEFT", 3, 15);
qualitybtn:SetScript("OnClick", function(self)
if AtlasLoot_QualityMenu:IsOpen() then
AtlasLoot_QualityMenu:Close();
else
AtlasLoot_QualityMenu:Open(self);
end
end);
qualitybtn:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
--Create equip type button
local equipbtn = CreateFrame("Button", framename.."_EquipButton", searchpanel, "OptionsButtonTemplate");
equipbtn:SetSize(130, 20);
equipbtn:SetPoint("TOPLEFT", searchbox, "BOTTOMLEFT", -8, -25);
equipbtn.title = equipbtn:CreateFontString(nil, "ARTWORK", "GameFontNormal");
equipbtn.title:SetText("Item Type: ");
equipbtn.title:SetPoint("TOPLEFT", equipbtn, "TOPLEFT", 3, 15);
--Create equip sub type button
equipbtn.subbtn = CreateFrame("Button", framename.."_EquipSubButton", equipbtn, "OptionsButtonTemplate");
equipbtn.subbtn:SetSize(130, 20);
equipbtn.subbtn:SetPoint("LEFT", equipbtn, "RIGHT", 15, 0);
equipbtn.subbtn.title = equipbtn.subbtn:CreateFontString(nil, "ARTWORK", "GameFontNormal");
equipbtn.subbtn.title:SetText("Item Subtype: ");
equipbtn.subbtn.title:SetPoint("TOPLEFT", equipbtn.subbtn, "TOPLEFT", 3, 15);
equipbtn:SetScript("OnClick", function(self)
if AtlasLoot_EquipMenu:IsOpen() then
AtlasLoot_EquipMenu:Close();
else
AtlasLoot_EquipMenu:Open(self);
end
end);
equipbtn:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
equipbtn.subbtn:SetScript("OnClick", function(self)
if AtlasLoot_EquipSubMenu:IsOpen() then
AtlasLoot_EquipSubMenu:Close();
else
AtlasLoot_EquipSubMenu:Open(self);
end
end);
equipbtn.subbtn:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
local levelminbox = CreateFrame("EditBox", framename.."_LevelMin", searchpanel, "InputBoxTemplate");
levelminbox:SetSize(47, 35);
levelminbox:SetPoint("TOPLEFT", searchbox, "BOTTOMLEFT", 0, -70);
local lmnb = levelminbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
levelminbox:SetMaxLetters(3);
levelminbox:SetAutoFocus(false);
levelminbox:SetTextInsets(0, 8, 0, 0);
levelminbox.title = levelminbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
levelminbox.title:SetText("Required Level: ");
levelminbox.title:SetPoint("TOPLEFT", levelminbox, "TOPLEFT", -3, 8);
local levelmaxbox = CreateFrame("EditBox", framename.."_LevelMax", searchpanel, "InputBoxTemplate");
levelmaxbox:SetSize(47, 35);
levelmaxbox:SetPoint("LEFT", levelminbox, "RIGHT", 25, 0);
local lmxb = levelmaxbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
levelmaxbox:SetMaxLetters(3);
levelmaxbox:SetAutoFocus(false);
levelmaxbox:SetTextInsets(0, 8, 0, 0);
local ilevelminbox = CreateFrame("EditBox", framename.."_iLevelMin", searchpanel, "InputBoxTemplate");
ilevelminbox:SetSize(47, 35);
ilevelminbox:SetPoint("LEFT", levelmaxbox, "RIGHT", 25, 0);
local ilmnb = ilevelminbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
ilevelminbox:SetMaxLetters(3);
ilevelminbox:SetAutoFocus(false);
ilevelminbox:SetTextInsets(0, 8, 0, 0);
ilevelminbox.title = ilevelminbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
ilevelminbox.title:SetText("Item Level: ");
ilevelminbox.title:SetPoint("TOPLEFT", ilevelminbox, "TOPLEFT", -3, 8);
local ilevelmaxbox = CreateFrame("EditBox", framename.."_iLevelMax", searchpanel, "InputBoxTemplate");
ilevelmaxbox:SetSize(47, 35);
ilevelmaxbox:SetPoint("LEFT", ilevelminbox, "RIGHT", 25, 0);
local ilmxb = ilevelmaxbox:CreateFontString(nil, "ARTWORK", "GameFontNormal");
ilevelmaxbox:SetMaxLetters(3);
ilevelmaxbox:SetAutoFocus(false);
ilevelmaxbox:SetTextInsets(0, 8, 0, 0);
local useleveltick = CreateFrame("CheckButton", framename.."_LevelToggle", searchpanel, "ChatConfigCheckButtonTemplate");
useleveltick:SetSize(20, 20);
useleveltick:SetPoint("TOPRIGHT", levelmaxbox, "BOTTOMRIGHT", 0, 5);
useleveltick.title = useleveltick:CreateFontString(nil, "ARTWORK", "GameFontNormal");
useleveltick.title:SetText("Use Current Lv: ");
useleveltick.title:SetPoint("TOPLEFT", levelminbox, "BOTTOMLEFT", 0, 5);
useleveltick:SetScript("OnClick", function(self, button)
if(self:GetChecked()) then levelmaxbox:Hide(); levelminbox:Hide();
else levelmaxbox:Show(); levelminbox:Show();
end
end)
local argpanel = CreateFrame("Frame", framename.."_ArgumentContainer", searchpanel);
argpanel:SetSize(450, 340);
argpanel:SetPoint("TOPLEFT", levelminbox, "BOTTOMLEFT", 0, -40);
argpanel.title = argpanel:CreateFontString(nil, "ARTWORK", "GameFontNormal");
argpanel.title:SetText("Additional Filters: ");
argpanel.title:SetPoint("TOPLEFT", argpanel, "TOPLEFT", 0, 0);
local addArg = CreateFrame("Button", "AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainerAddArgBtn", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "OptionsButtonTemplate");
addArg:SetPoint("TOP", useleveltick, "BOTTOM", 5, -20);
addArg:SetSize(20, 20);
addArg:SetText("+");
addArg:SetScript("OnClick", function(self, button)
AtlasLoot_AddArgumentContainer();
end)
local remArg = CreateFrame("Button", "AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainerRemArgBtn", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "OptionsButtonTemplate")
remArg:SetPoint("LEFT", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainerAddArgBtn, "RIGHT", 10, 0);
remArg:SetSize(20, 20);
remArg:SetText("-");
remArg:SetScript("OnClick", function(self, button)
AtlasLoot_RemoveArgumentContainer();
end)
remArg:Disable();
for n = 1, MAX_ARGUMENTS do
local btn = CreateFrame("Button", "AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. tostring(n), AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "OptionsButtonTemplate");
btn:SetPoint("TOPLEFT", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "TOPLEFT", 0, -((n - 1) * 35)-20);
btn:SetSize(130, 20);
btn:SetScript("OnClick", function(self, button)
if AtlasLoot_ArgumentMenus[n]:IsOpen() then
AtlasLoot_ArgumentMenus[n]:Close();
else
AtlasLoot_ArgumentMenus[n]:Open(self);
end
end)
btn:Hide();
btn:SetText("Select Option");
local sub = CreateFrame("Button", "AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. tostring(n) .. "Sub", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "OptionsButtonTemplate");
sub:SetPoint("LEFT", btn, "RIGHT", 15, 0);
sub:SetSize(130, 20);
sub:SetScript("OnClick", function(self, button)
if AtlasLoot_ArgumentSubMenus[n]:IsOpen() then
AtlasLoot_ArgumentSubMenus[n]:Close();
else
AtlasLoot_ArgumentSubMenus[n]:Open(self);
end
end)
sub:Hide();
sub:Disable();
local txt = CreateFrame("EditBox", "AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer" .. tostring(n) .. "Value", AtlasLootDefaultFrame_AdvancedSearchPanel_ArgumentContainer, "InputBoxTemplate")
txt:SetPoint("LEFT", sub, "RIGHT", 15, 0);
txt:SetSize(65, 35);
txt:SetAutoFocus(false);
txt:SetTextInsets(0, 8, 0, 0);
txt:SetScript("OnEnterPressed", function(self)
self:ClearFocus();
end)
txt:Hide();
end
--Search Button
local searchbtn = CreateFrame("Button", framename.."_SearchButton", searchpanel, "UIPanelButtonTemplate2");
searchbtn:SetSize(70,32);
searchbtn:SetPoint("BOTTOMLEFT", searchpanel, "BOTTOMLEFT", 20, 20);
searchbtn:SetScript("OnShow", function(self)
self:SetText(AL["Search"]);
self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 );
end);
searchbtn:SetScript("OnClick", function()
AtlasLoot:AdvancedSearch(AtlasLootDefaultFrame_AdvancedSearchPanel_SearchBox:GetText());
AtlasLootDefaultFrame_AdvancedSearchPanel_SearchBox:ClearFocus();
end);
local clearbtn = CreateFrame("Button", framename.."_ClearButton", searchpanel, "UIPanelButtonTemplate2");
clearbtn:SetSize(70,32);
clearbtn:SetPoint("LEFT", searchbtn, "RIGHT", 20, 0);
clearbtn:SetScript("OnShow", function(self)
self:SetText(AL["Clear"]);
self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 );
end);
clearbtn:SetScript("OnClick", function()
AtlasLoot_AdvancedSearchReset();
AtlasLootDefaultFrame_AdvancedSearchPanel_SearchBox:SetText("");
AtlasLootDefaultFrame_AdvancedSearchPanel_SearchBox:ClearFocus();
end);
AtlasLoot_AdvancedSearchSetup();
--[[
function StreamingIcon_UpdateIcon(status, tooltip)
if(status > 0) then
AtlasLoot_SearchProgressSpinner:SetVertexColor(0,1,0);
AtlasLoot_SearchProgressFrameBackground:SetVertexColor(0,1,0);
AtlasLoot_SearchProgress.tooltip = tooltip;
AtlasLoot_SearchProgress.Loop:Play();
AtlasLoot_SearchProgress:Show();
else
AtlasLoot_SearchProgress.Loop:Stop();
AtlasLoot_SearchProgress:Hide();
end
end
local streamIcon = CreateFrame("Frame", "AtlasLoot_SearchProgress", AtlasLootDefaultFrame_LootBackground);
streamIcon:SetPoint("TOPRIGHT", AtlasLootDefaultFrame_LootBackground, "TOPRIGHT");
streamIcon:SetSize(48, 48);
streamIcon.tooltip = "Searching...";
streamIcon:EnableMouse(true);
streamIcon.icon = streamIcon:CreateTexture("$parentSpinner", "BACKGROUND");
streamIcon.icon:SetTexture("Interface\\Addons\\AtlasLoot\\Images\\streamcircle");
streamIcon.icon:SetVertexColor(0,1,0);
streamIcon.icon:SetAllPoints();
streamIcon.spark = streamIcon:CreateTexture("OVERLAY");
streamIcon.spark:SetTexture("Interface\\Addons\\AtlasLoot\\Images\\streamspark");
streamIcon.spark:SetAllPoints();
streamIcon.frame = CreateFrame("Frame", "$parentFrame", AtlasLoot_SearchProgress);
streamIcon.frame:SetAllPoints();
streamIcon.frame.bg = streamIcon.frame:CreateTexture("$parentBackground", "BACKGROUND");
streamIcon.frame.bg:SetTexture("Interface\\Addons\\AtlasLoot\\Images\\streambackground");
streamIcon.frame.bg:SetVertexColor(0,1,0);
streamIcon.frame.bg:SetAllPoints();
streamIcon.frame.alpha = streamIcon.frame:CreateTexture("$parentAlpha", "ARTWORK");
streamIcon.frame.alpha:SetTexture("Interface\\Addons\\AtlasLoot\\Images\\streamframe");
streamIcon.frame.alpha:SetAllPoints();
streamIcon.Loop = streamIcon:CreateAnimationGroup("$parentLoopAnim");
streamIcon.Loop:SetLooping("REPEAT");
local rotAnim = streamIcon.Loop:CreateAnimation("ROTATION");
rotAnim:SetOrder(1);
rotAnim:SetDuration(8);
rotAnim:SetDegrees(-360);
streamIcon:SetScript("OnEnter",
function(self)
if(self.tooltip ~= nil) then
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, true);
end
end);
streamIcon:SetScript("OnLeave", GameTooltip_Hide);
streamIcon:SetScript("OnShow", function(self) self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 ) end);
streamIcon:SetPoint("TOPRIGHT", AtlasLootDefaultFrame_LootBackground, "TOPRIGHT");
streamIcon:Hide();]]
@@ -0,0 +1,394 @@
--[[
Functions:
AtlasLoot:DewDropClick(tablename, text, tabletype, tabletype2)
AtlasLoot:DewDropSubMenuClick(tablename)
AtlasLoot:DewdropExpansionMenuClick(tablename, text)
AtlasLoot_DefaultFrame_OnShow()
AtlasLootDefaultFrame_OnHide()
AtlasLoot:DewdropExpansionMenuRegister(loottable)
AtlasLoot:DewdropSubMenuRegister(loottable)
AtlasLoot:DewdropRegister()
AtlasLoot:SetNewStyle(style)
]]
--Include all needed libraries
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
local BabbleBoss = AtlasLoot_GetLocaleLibBabble("LibBabble-Boss-3.0")
local BabbleFaction = AtlasLoot_GetLocaleLibBabble("LibBabble-Faction-3.0")
local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
--Load the 2 dewdrop menus
AtlasLoot_Dewdrop = AceLibrary("Dewdrop-2.0");
AtlasLoot_DewdropSubMenu = AceLibrary("Dewdrop-2.0");
AtlasLoot_DewdropExpansionMenu = AceLibrary("Dewdrop-2.0");
ItemindexID = 2;
AtlasLoot_Data["AtlasLootFallback"] = {
EmptyInstance = {};
};
--[[
AtlasLootDefaultFrame_OnShow:
Called whenever the loot browser is shown and sets up buttons and loot tables
]]
function AtlasLootDefaultFrame_OnShow()
--Definition of where I want the loot table to be shown
--Remove the selection of a loot table in Atlas
AtlasLootItemsFrame.activeBoss = nil;
--Set the item table to the loot table
--Show the last displayed loot table
local lastboss = AtlasLoot.db.profile.LastBoss;
if AtlasLoot.db.profile.AutoCurrentInstance and AtlasLoot:ShowInstance() then elseif lastboss and lastboss[4] then
ATLASLOOT_CURRENTTABLE = lastboss[5];
ATLASLOOT_LASTMODULE = lastboss[4];
AtlasLoot:IsLootTableAvailable(lastboss[4]);
AtlasLoot:ShowItemsFrame(lastboss[1], "AtlasLoot_Data", lastboss[3]);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[5]]);
AtlasLoot:WishListOptionsRegister();
else
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
end
end
-- Show the Instance you are in
function AtlasLoot:ShowInstance()
for i,v in pairs(AtlasLoot_SubMenus) do
for n,t in ipairs(v) do
if t[4] == BabbleZone[GetRealZoneText()] then
ATLASLOOT_CURRENTTABLE = v.SubMenu;
ATLASLOOT_LASTMODULE = v.Module;
AtlasLoot:IsLootTableAvailable(ATLASLOOT_LASTMODULE);
AtlasLoot:ShowItemsFrame(t[2], "AtlasLoot_Data", 1);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE]);
AtlasLoot:WishListOptionsRegister();
return true;
end
end
end
end
--[[
AtlasLootDefaultFrame_OnHide:
When we close the loot browser, re-bind the item table to Atlas
and close all Dewdrop menus
]]
function AtlasLootDefaultFrame_OnHide()
AtlasLoot_Dewdrop:Close(1);
AtlasLoot_DewdropSubMenu:Close(1);
AtlasLoot_DewdropExpansionMenu:Close(1);
end
--[[
AtlasLoot:DewDropClick(tablename, text, tabletype):
tablename - Name of the loot table in the database
text - Heading for the loot table
Called when a button in AtlasLoot_Dewdrop is clicked
]]
function AtlasLoot:DewDropClick(tablename, text, tablenum)
ATLASLOOT_FILTER_ENABLE = false;
AtlasLootFilterCheck:SetChecked(false);
tablename = tablename .. AtlasLoot_Expac;
ATLASLOOT_CURRENTTABLE = tablename;
tablenum = tablenum or 1;
ATLASLOOT_LASTMODULE = AtlasLoot_SubMenus[tablename].Module;
AtlasLootDefaultFrame_Menu:SetText(text);
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
local lasttable = AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE];
if lasttable then
AtlasLoot:ShowItemsFrame(lasttable[1], lasttable[2], lasttable[3]);
else
AtlasLoot:ShowItemsFrame(AtlasLoot_SubMenus[tablename][tablenum][2], "AtlasLoot_Data", tablenum);
end
AtlasLoot_Dewdrop:Close(1);
end
--[[
AtlasLoot:DewDropSubMenuClick(tablename):
tablename - Name of the loot table in the database
text - Heading for the loot table
Called when a button in AtlasLoot_DewdropSubMenu is clicked
]]
function AtlasLoot:DewDropSubMenuClick(tablename)
--Show the select loot table
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
--Show the table that has been selected
AtlasLoot:ShowItemsFrame(tablename, "AtlasLoot_Data", tablenum);
AtlasLoot_DewdropSubMenu:Close(1);
end
--[[
AtlasLoot:DewdropExpansionMenuClick(expansion, name):
tablename - Name of the loot table in the database
text - Heading for the loot table
Called when a button in AtlasLoot_DewdropSubMenu is clicked
]]
function AtlasLoot:DewdropExpansionMenuClick(expansion, name)
AtlasLootDefaultFrame_ExpansionMenu:SetText(name);
AtlasLoot_DewdropExpansionMenu:Close(1);
AtlasLoot_Expac = expansion;
if ATLASLOOT_CURRENTTABLE then
ATLASLOOT_CURRENTTABLE = AtlasLoot:CleandataID(ATLASLOOT_CURRENTTABLE, 1) .. AtlasLoot_Expac;
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE].Module);
local tablename = AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE][1][2];
local lasttable = AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE];
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE]);
if lasttable then
AtlasLoot:ShowItemsFrame(lasttable[1], lasttable[2], lasttable[3]);
else
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
AtlasLoot:ShowItemsFrame(tablename, "AtlasLoot_Data", tablenum);
end
end
end
--[[
AtlasLoot:DewdropExpansionMenuRegister():
Adds expansion menu from expansion table in mainmenus.lua
]]
function AtlasLoot:DewdropExpansionMenuRegister()
AtlasLoot_DewdropExpansionMenu:Register(AtlasLootDefaultFrame_ExpansionMenu,
'point', function(parent)
return "TOP", "BOTTOM"
end,
'children', function(level, value)
if AtlasLoot_ExpansionMenu then
for k,v in ipairs(AtlasLoot_ExpansionMenu) do
if type(v) == "table" then
--If a link to show a expansion menu
AtlasLoot_Dewdrop:AddLine(
'text', v[1],
'textR', 1,
'textG', 0.82,
'textB', 0,
'func', function(arg1,arg2,arg3) AtlasLoot:DewdropExpansionMenuClick(arg1,arg2,arg3) end,
'arg1', v[2],
'arg2', v[1],
'arg3', k,
'notCheckable', true
)
end
end
end
--Close button
AtlasLoot_Dewdrop:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_Dewdrop:Close() end,
'notCheckable', true
)
end,
'dontHook', true
)
end
--[[
AtlasLoot:DewdropSubMenuRegister(loottable):
loottable - Table defining the sub menu
Generates the sub menu needed by passing a table of loot tables and titles
]]
function AtlasLoot:DewdropSubMenuRegister(loottable)
AtlasLoot_DewdropSubMenu:Register(AtlasLootDefaultFrame_SubMenu,
'point', function(parent)
return "TOP", "BOTTOM"
end,
'children', function(level, value)
for k,v in pairs(loottable) do
if type(v) == "table" then
if v[3] == "Header" then
AtlasLoot_DewdropSubMenu:AddLine(
'text', v[1],
'textR', 0.2,
'textG', 0.82,
'textB', 0.5,
'func', function(arg1) AtlasLoot:DewDropSubMenuClick(arg1) end,
'arg1', v[2],
'notCheckable', true
)
else
AtlasLoot_DewdropSubMenu:AddLine(
'text', AtlasLoot_Data[v[2]].Name,
'func', function(arg1,arg2) AtlasLoot:DewDropSubMenuClick(arg1) end,
'arg1', v[2],
'notCheckable', true
)
end
end
end
--Close button
AtlasLoot_DewdropSubMenu:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_DewdropSubMenu:Close() end,
'notCheckable', true
)
end,
'dontHook', true
)
end
--[[
AtlasLoot:DewdropRegister:
Constructs the main category menu from a tiered table
]]
function AtlasLoot:DewdropRegister()
AtlasLoot_Dewdrop:Register(AtlasLootDefaultFrame_Menu,
'point', function(parent)
return "TOP", "BOTTOM"
end,
'children', function(level, value)
if AtlasLoot_Modules then
for k,v in ipairs(AtlasLoot_Modules) do
--If a link to show a submenu
AtlasLoot_Dewdrop:AddLine(
'text', v[1],
'textR', 1,
'textG', 0.82,
'textB', 0,
'func', function(arg1,arg2,arg3) AtlasLoot:DewDropClick(arg1,arg2,arg3) end,
'arg1', v[2],
'arg2', v[1],
'arg3', v[3],
'notCheckable', true
)
end
end
--Close button
AtlasLoot_Dewdrop:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_Dewdrop:Close() end,
'notCheckable', true
)
end,
'dontHook', true
)
end
--[[
AtlasLoot:SetNewStyle:
Create the new Default Frame style
style = "new"
style = "old"
]]
function AtlasLoot:SetNewStyle(style)
local buttons = {
"AtlasLootDefaultFrame_Options",
"AtlasLootDefaultFrame_LoadModules",
"AtlasLootDefaultFrame_Menu",
"AtlasLootDefaultFrame_SubMenu",
"AtlasLootDefaultFrame_ExpansionMenu",
"AtlasLootDefaultFrame_Preset1",
"AtlasLootDefaultFrame_Preset2",
"AtlasLootDefaultFrame_Preset3",
"AtlasLootDefaultFrame_Preset4",
"AtlasLootDefaultFrameSearchButton",
"AtlasLootDefaultFrameSearchClearButton",
"AtlasLootDefaultFrameLastResultButton",
"AtlasLootDefaultFrameWishListButton",
"AtlasLootDefaultFrameAdvancedSearchButton",
"AtlasLootDefaultFrame_AdvancedSearchPanel_EquipButton",
"AtlasLootDefaultFrame_AdvancedSearchPanel_EquipSubButton",
"AtlasLootDefaultFrame_AdvancedSearchPanel_QualityButton",
"AtlasLootDefaultFrame_AdvancedSearchPanel_SearchButton",
"AtlasLootDefaultFrame_AdvancedSearchPanel_ClearButton",
"AtlasLootDefaultFrame_MapButton",
"AtlasLootDefaultFrame_MapSelectButton",
"AtlasLootDefaultFrame_LoadInstanceButton",
}
if style == "new" then
AtlasLootDefaultFrame_LootBackground:SetBackdrop({bgFile = "Interface/AchievementFrame/UI-Achievement-StatsBackground"});
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(1,1,1,0.5);
AtlasLootDefaultFrame:SetBackdrop({bgFile = "Interface/AchievementFrame/UI-Achievement-AchievementBackground",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }});
AtlasLootDefaultFrame:SetBackdropColor(1,1,1,0.5)
AtlasLootDefaultFrame:SetBackdropBorderColor(1,0.675,0.125,1)
AtlasLootDefaultFrameHeader:SetTexture("Interface\\AchievementFrame\\UI-Achievement-Alert-Background.blp")
AtlasLootDefaultFrameHeader:SetTexCoord(0,0.605,0,0.703)
AtlasLootDefaultFrameHeader:SetWidth(299)
AtlasLootDefaultFrameHeader:SetHeight(60)
AtlasLootDefaultFrameHeader:SetPoint("TOP",AtlasLootDefaultFrame,"TOP",-3,22)
AtlasLootDefaultFrame_Options:SetNormalTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
AtlasLootDefaultFrame_Options:SetHeight(24)
AtlasLootDefaultFrame_Options:SetPushedTexture("Interface/AchievementFrame/UI-Achievement-Category-Background")
AtlasLootDefaultFrame_Options:SetHeight(24)
local function SetButtons(path)
_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 = _G[path]:GetPushedTexture();
tex2:SetTexCoord(0, 0.6640625, 0, 0.8);
tex2:SetHeight(32)
end
for k,v in pairs(buttons) do
SetButtons(v)
end
elseif style == "old" then
AtlasLootDefaultFrame_LootBackground:SetBackdrop({bgFile = ""});
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(0,0,0.5,0.5);
AtlasLootDefaultFrame:SetBackdrop({bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
edgeFile = "Interface/DialogFrame/UI-DialogBox-Border",
edgeSize = 32,
insets = { left = 11, right = 12, top = 12, bottom = 11 }});
AtlasLootDefaultFrame:SetBackdropColor(1,1,1,1)
AtlasLootDefaultFrame:SetBackdropBorderColor(1,1,1,1)
AtlasLootDefaultFrameHeader:SetTexture("Interface/DialogFrame/UI-DialogBox-Header")
AtlasLootDefaultFrameHeader:SetTexCoord(0,1,0,1)
AtlasLootDefaultFrameHeader:SetWidth(425)
AtlasLootDefaultFrameHeader:SetHeight(64)
AtlasLootDefaultFrameHeader:SetPoint("TOP",AtlasLootDefaultFrame,"TOP",0,12)
AtlasLootDefaultFrame_Options:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
AtlasLootDefaultFrame_Options:SetHeight(20)
AtlasLootDefaultFrame_Options:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
AtlasLootDefaultFrame_Options:SetHeight(20)
local function SetButtons(path)
_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 = _G[path]:GetPushedTexture();
tex2:SetTexCoord(0, 0.625, 0, 0.6875);
tex2:SetHeight(20)
end
for k,v in pairs(buttons) do
SetButtons(v)
end
end
end
@@ -0,0 +1,726 @@
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
--Main AtlasLoot Frame
local mainframe = CreateFrame("FRAME", "AtlasLootDefaultFrame", UIParent);
mainframe:SetPoint("CENTER",0,0);
mainframe:SetSize(880,690);
mainframe:EnableMouse(true);
mainframe:SetMovable(1);
mainframe:SetFrameStrata("HIGH");
mainframe:RegisterForDrag("LeftButton");
mainframe:SetMovable(true);
mainframe:EnableKeyboard(true)
mainframe:Hide()
mainframe:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = "true",
insets = {left = "11", right = "12", top = "12", bottom = "11"},
edgeSize = 32,
titleSize = 32,
});
mainframe:SetScript("OnShow", function()
AtlasLootDefaultFrame_OnShow();
end);
mainframe:SetScript("OnHide", function() AtlasLootDefaultFrame_OnHide() end)
mainframe:SetScript("OnDragStart", function(self)
self:StartMoving();
self.isMoving = true;
end);
mainframe:SetScript("OnDragStop", function(self)
self:StopMovingOrSizing();
self.isMoving = false;
end);
mainframe.header = mainframe:CreateTexture("AtlasLootDefaultFrameHeader","ARTWORK");
mainframe.header:SetSize(425,64);
mainframe.header:SetPoint("TOP",0,12);
mainframe.header:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header");
mainframe.header.txt = mainframe:CreateFontString(nil,"ARTWORK","GameFontNormal");
mainframe.header.txt:SetPoint("TOP",0,-1);
mainframe.header.txt:SetText(ATLASLOOT_VERSION);
mainframe.header.notice = mainframe:CreateFontString("AtlasLootDefaultFrame_Notice","ARTWORK","GameFontNormal");
mainframe.header.notice:SetPoint("BOTTOM",0,17);
--Loot Background
local lootbground = CreateFrame("Frame", "AtlasLootDefaultFrame_LootBackground",AtlasLootDefaultFrame);
lootbground:SetSize(540,515);
lootbground:SetPoint("BOTTOMLEFT", AtlasLootDefaultFrame, "BOTTOMLEFT",40,90);
lootbground.Back = lootbground:CreateTexture("AtlasLootDefaultFrame_LootBackground_Back", "BACKGROUND");
lootbground.Back:SetAllPoints();
lootbground.Back:SetPoint("TOPLEFT","AtlasLootDefaultFrame_LootBackground","TOPLEFT");
lootbground.Back:SetPoint("BOTTOMRIGHT","AtlasLootDefaultFrame_LootBackground","BOTTOMRIGHT");
lootbground:SetBackdropColor(0,0,0.5,0.5);
lootbground:EnableMouse();
lootbground:SetScript("OnMouseDown",function(self, button)
if _G[AtlasLootItemsFrame.refresh[2]][AtlasLootItemsFrame.refresh[1]].Back and button == "RightButton" then
AtlasLoot:BackButton_OnClick();
elseif AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() and button == "RightButton" then
AtlasLoot_AdvancedSearchClose();
end
AtlasLoot_Dewdrop:Close();
AtlasLoot_DewdropSubMenu:Close();
AtlasLoot_DewdropExpansionMenu:Close();
AtlasLoot_WishListDrop:Close();
AtlasLoot_WishListOptions:Close();
end);
----------------------------------- Item Loot Panel -------------------------------------------
local itemframe = CreateFrame("Frame", "AtlasLootItemsFrame", AtlasLootDefaultFrame_LootBackground);
itemframe:SetSize(535,510);
itemframe:Hide();
itemframe:SetPoint("TOPLEFT", AtlasLootDefaultFrame_LootBackground, "TOPLEFT", 2, -2);
itemframe.Label = itemframe:CreateFontString("AtlasLoot_BossName","OVERLAY","GameFontHighlightLarge");
itemframe.Label:SetPoint("TOP", "AtlasLootItemsFrame", "TOP");
itemframe.Label:SetSize(512,30);
itemframe.Label:SetJustifyH("CENTER");
itemframe.Back = itemframe:CreateTexture("AtlasLootItemsFrame_Back", "BACKGROUND");
itemframe.Back:SetAllPoints();
itemframe.Back:SetPoint("TOPLEFT","AtlasLootDefaultFrame_LootBackground","TOPLEFT");
itemframe.Back:SetPoint("BOTTOMRIGHT","AtlasLootDefaultFrame_LootBackground","BOTTOMRIGHT");
itemframe:SetBackdropColor(0,0,0,0.7);
itemframe:EnableMouseWheel(true);
itemframe:SetScript("OnMouseWheel", function(self,delta)
if AtlasLootItemsFrame_NEXT:IsVisible() and delta == -1 then
AtlasLootItemsFrame_NEXT:Click();
end
if AtlasLootItemsFrame_PREV:IsVisible() and delta == 1 then
AtlasLootItemsFrame_PREV:Click();
end
end);
local function createLootItemButtons(num)
local button = CreateFrame("Button","AtlasLootItem_"..num, AtlasLootItemsFrame);
button:SetID(num);
button:SetSize(236,28);
button:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
button.icon = button:CreateTexture("AtlasLootItem_"..num.."_Icon","ARTWORK");
button.icon:SetSize(25,25);
button.icon:SetPoint("TOPLEFT", "AtlasLootItem_"..num,"TOPLEFT",1,-1);
button.name = button:CreateFontString("AtlasLootItem_"..num.."_Name","ARTWORK","GameFontNormal");
button.name:SetSize(205,12);
button.name:SetPoint("TOPLEFT","AtlasLootItem_"..num.."_Icon","TOPRIGHT",3,0);
button.name:SetJustifyH("LEFT");
button.extra = button:CreateFontString("AtlasLootItem_"..num.."_Extra","ARTWORK","GameFontNormal");
button.extra:SetSize(205,10);
button.extra:SetPoint("TOPLEFT","AtlasLootItem_"..num.."_Name","BOTTOMLEFT",0,-1);
button.extra:SetJustifyH("LEFT");
button:RegisterForClicks("AnyDown");
button.number = num;
button:SetScript("OnEnter", function(self) AtlasLootItem_OnEnter(self) end);
button:SetScript("OnLeave", function(self) AtlasLootItem_OnLeave(self) end);
button:SetScript("OnClick", function(self, arg1) AtlasLootItem_OnClick(self, arg1) end);
button.unsafe = button:CreateTexture("AtlasLootItem_"..num.."_Unsafe","BACKGROUND");
button.unsafe:Hide();
button.unsafe:SetSize(27,27);
button.unsafe:SetPoint("TOPLEFT","AtlasLootItem_"..num,"TOPLEFT");
button.unsafe:SetVertexColor(1,0,0,1);
if num == 1 then
button:SetPoint("TOPLEFT", "AtlasLootItemsFrame", "TOPLEFT",25,-35);
elseif num == 16 then
button:SetPoint("TOPLEFT", "AtlasLootItem_1", "TOPRIGHT",0,0);
else
button:SetPoint("TOPLEFT", "AtlasLootItem_"..(num - 1), "BOTTOMLEFT");
end
end
for i = 1, 30 do
createLootItemButtons(i);
end
-- LootInfo
local lootinfo = CreateFrame("Frame", "AtlasLootInfo")
lootinfo:SetSize(128,75);
lootinfo.text1 = lootinfo:CreateFontString("AtlasLootInfo_Text1", "OVERLAY", "GameFontNormal");
lootinfo.text1:SetSize(180,10);
lootinfo.text1:SetText("ATLASLOOT_VERSION");
lootinfo.text1:SetJustifyH("LEFT");
lootinfo.text1:SetPoint("TOPLEFT", "AtlasLootInfo", "TOPLEFT",0,25);
lootinfo.text2 = lootinfo:CreateFontString("AtlasLootInfo_Text2", "OVERLAY", "GameFontNormal");
lootinfo.text2:SetSize(180,10);
lootinfo.text2:SetJustifyH("LEFT");
lootinfo.text2:SetText(AL["Click boss name to view loot."]);
lootinfo.text2:SetPoint("TOPLEFT", "AtlasLootInfo", "TOPLEFT",0,-2);
-- Next Button
local nextbtn = CreateFrame("Button", "AtlasLootItemsFrame_NEXT", AtlasLootItemsFrame);
nextbtn:SetPoint("BOTTOMRIGHT", "AtlasLootItemsFrame", "BOTTOMRIGHT",-5,5);
nextbtn:SetSize(32,32);
nextbtn.texture = nextbtn:CreateTexture(nil, "BACKGROUND");
nextbtn.texture:SetTexture("Interface\\Buttons\\UI-PageButton-Background");
nextbtn.texture:SetSize(32,32);
nextbtn.texture:SetPoint("CENTER",0,0);
nextbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up");
nextbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
nextbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
nextbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
nextbtn:SetScript("OnClick", function(self) AtlasLoot:NavButton_OnClick(self) end)
nextbtn:Hide();
-- Previous button
local prevbtn = CreateFrame("Button", "AtlasLootItemsFrame_PREV", AtlasLootItemsFrame);
prevbtn:SetPoint("BOTTOMLEFT", "AtlasLootItemsFrame", "BOTTOMLEFT",5,5);
prevbtn:SetSize(32,32);
prevbtn.texture = prevbtn:CreateTexture(nil, "BACKGROUND");
prevbtn.texture:SetTexture("Interface\\Buttons\\UI-PageButton-Background");
prevbtn.texture:SetSize(32,32);
prevbtn.texture:SetPoint("CENTER",0,0);
prevbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Up");
prevbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Down");
prevbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Disabled");
prevbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
prevbtn:SetScript("OnClick", function(self) AtlasLoot:NavButton_OnClick(self) end)
prevbtn:Hide();
-- Back button
local backbtn = CreateFrame("Button", "AtlasLootItemsFrame_BACK", AtlasLootItemsFrame, "OptionsButtonTemplate");
backbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",0,4);
backbtn:SetText(AL["Back"]);
backbtn:SetScript("OnClick", function(self) AtlasLoot:BackButton_OnClick() end)
backbtn:Hide();
-- Wishlist Own/Swap button
local swapbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Swap", AtlasLootItemsFrame, "OptionsButtonTemplate");
swapbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",50,4);
swapbtn:SetScript("OnClick", function(self) AtlasLoot:WishListSwapButton("","","","","",self,true) end)
swapbtn:Hide();
-- Wishlist Options button
local optionsbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Options", AtlasLootItemsFrame, "OptionsButtonTemplate");
optionsbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Swap", "BOTTOM",-100,0);
optionsbtn:SetText(AL["Options"]);
optionsbtn:SetScript("OnClick", function(self)
if AtlasLoot_WishListOptions:IsOpen() then
AtlasLoot_WishListOptions:Close();
else
AtlasLoot_WishListOptions:Open(self);
end
end);
optionsbtn:Hide();
-- Wishlist Item Lock button
ATLASLOOT_ITEM_UNLOCK = false;
local lockbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_UnLock", AtlasLootItemsFrame, "OptionsButtonTemplate");
lockbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Options", "BOTTOM",-100,0);
lockbtn:SetScript("OnClick", function(self)
if ATLASLOOT_ITEM_UNLOCK then
ATLASLOOT_ITEM_UNLOCK = false;
lockbtn:SetText("Locked");
else
ATLASLOOT_ITEM_UNLOCK = true;
lockbtn:SetText("UnLocked");
end
end)
lockbtn:SetScript("OnEnter", function(self)
GameTooltip:ClearLines();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 5);
GameTooltip:AddLine("Toggle Item Moving");
GameTooltip:AddLine("Left Click to move item up");
GameTooltip:AddLine("Right Click to move item down");
GameTooltip:AddLine("Alt + Left Click to add a Custom Header");
GameTooltip:Show();
end);
lockbtn:SetScript("OnLeave", function()
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
end);
lockbtn:SetText("Locked");
lockbtn:Hide();
-- Wishlist Share button
local sharebtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Share", AtlasLootItemsFrame, "OptionsButtonTemplate");
sharebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Swap", "BOTTOM",100,0);
sharebtn:SetText(AL["Share"]);
sharebtn:SetScript("OnClick", function() AtlasLoot:ShareWishList() end)
sharebtn:Hide();
-- Filter Button
local filterbtn = CreateFrame("CheckButton","AtlasLootFilterCheck",AtlasLootItemsFrame,"OptionsCheckButtonTemplate");
filterbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",85 ,27);
filterbtn.Label = filterbtn:CreateFontString("AtlasLootFilterCheckText","OVERLAY","GameFontNormal");
filterbtn.Label:SetText(AL["Filter"]);
filterbtn.Label:SetPoint("RIGHT", AtlasLootFilterCheck, 30, 2);
filterbtn:SetScript("OnClick", function() AtlasLoot_FilterEnableButton() end);
-- Quick Looks Button
local looksbtn = CreateFrame("Button", "AtlasLootQuickLooksButton", AtlasLootItemsFrame);
looksbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",58,28);
looksbtn:SetSize(25,25);
looksbtn.Label = looksbtn:CreateFontString("AtlasLoot_QuickLooks","OVERLAY","GameFontNormal");
looksbtn.Label:SetSize(200,25);
looksbtn.Label:SetText(AL["Add to QuickLooks:"]);
looksbtn.Label:SetPoint("LEFT", "AtlasLootQuickLooksButton", -125, 0);
looksbtn.Label:SetJustifyH("LEFT");
looksbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up");
looksbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
looksbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
looksbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
looksbtn:SetScript("OnClick", function(self) AtlasLoot:ShowQuickLooks(self) end)
looksbtn:SetScript("OnShow", function(self)
if (AtlasLootItemsFrame.refresh) and ((AtlasLootItemsFrame.refresh[1] == "SearchResult") or (AtlasLootItemsFrame.refresh[1] == "WishList")) then
self:Disable();
else
self:Enable();
end
end)
looksbtn:Hide();
------------------------------------ Buttons at the top of the frame ---------------------------------------
--Close Button
local closebtn = CreateFrame("Button", "AtlasLootDefaultFrame_CloseButton", AtlasLootDefaultFrame, "UIPanelCloseButton");
closebtn:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT",-10,-10);
closebtn:SetScript("OnClick", function() AtlasLootDefaultFrame:Hide() end);
--Load All Addon Moduels Button
local loadModulebtn = CreateFrame("Button", "AtlasLootDefaultFrame_LoadModules", AtlasLootDefaultFrame, "OptionsButtonTemplate");
loadModulebtn:SetSize(105,20);
loadModulebtn:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT",-38,-15);
loadModulebtn:SetText(AL["Load Modules"]);
loadModulebtn:SetScript("OnClick", function() AtlasLoot:LoadAllModules() end);
--Options Button
local optionsbtn = CreateFrame("Button", "AtlasLootDefaultFrame_Options", AtlasLootDefaultFrame, "OptionsButtonTemplate");
optionsbtn:SetSize(105,20);
optionsbtn:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT",40,-15);
optionsbtn:SetText(AL["Options"]);
optionsbtn:SetScript("OnClick", function() AtlasLootOptions_Toggle() end);
--Moduel Menu Button
local menubtn = CreateFrame("Button", "AtlasLootDefaultFrame_Menu", AtlasLootDefaultFrame, "OptionsButtonTemplate");
menubtn:SetSize(174,25);
menubtn:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT",38,-55);
menubtn.Lable = menubtn:CreateFontString("AtlasLootDefaultFrame_SelectedCategory", "OVERLAY","GameFontNormal")
menubtn.Lable:SetPoint("TOP",menubtn,"BOTTOM",0,37);
menubtn.Lable:SetText("Select Module");
menubtn.Lable:Show();
menubtn:SetText(AL["Select Loot Table"]);
menubtn:SetScript("OnClick", function(self)
if AtlasLoot_Dewdrop:IsOpen() then
AtlasLoot_Dewdrop:Close();
else
AtlasLoot_Dewdrop:Open(self);
end
end);
--SubMenu Button
local submenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_SubMenu", AtlasLootDefaultFrame, "OptionsButtonTemplate");
submenubtn:SetSize(200,25);
submenubtn:SetPoint("LEFT", "AtlasLootDefaultFrame_Menu", "RIGHT",0,0);
submenubtn.Lable = submenubtn:CreateFontString("AtlasLootDefaultFrame_SelectedTable", "OVERLAY","GameFontNormal")
submenubtn.Lable:SetPoint("TOP","AtlasLootDefaultFrame_SubMenu","BOTTOM",0,37);
submenubtn.Lable:SetText("Select Subcategory");
submenubtn.Lable:Show();
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();
else
AtlasLoot_DewdropSubMenu:Open(self);
end
end);
--Expansion Menu Button
local expansionmenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_ExpansionMenu", AtlasLootDefaultFrame, "OptionsButtonTemplate");
expansionmenubtn:SetSize(174,25);
expansionmenubtn:SetPoint("LEFT", "AtlasLootDefaultFrame_SubMenu", "RIGHT",0,0);
expansionmenubtn:SetText(AtlasLoot_ExpansionMenu[GetAccountExpansionLevel()+1][1]);
expansionmenubtn.Lable = expansionmenubtn:CreateFontString("AtlasLootDefaultFrame_SelectedTable2", "OVERLAY","GameFontNormal")
expansionmenubtn.Lable:SetPoint("TOP",expansionmenubtn,"BOTTOM",0,37);
expansionmenubtn.Lable:SetText("Select Expansion");
expansionmenubtn.Lable:Show();
expansionmenubtn:SetScript("OnClick", function(self)
if AtlasLoot_DewdropExpansionMenu:IsOpen() then
AtlasLoot_DewdropExpansionMenu:Close();
else
AtlasLoot_DewdropExpansionMenu:Open(self);
end
end);
---------------------------------------- Buttons Under the loot and subtable frames -------------------------------------------
--Wish List Button
local wishbtn = CreateFrame("Button", "AtlasLootDefaultFrameWishListButton", AtlasLootDefaultFrame, "OptionsButtonTemplate");
wishbtn:SetPoint("BOTTOMLEFT", "AtlasLootDefaultFrame", "BOTTOMLEFT", 40, 63);
wishbtn:SetSize(105,20);
wishbtn:RegisterForClicks("LeftButtonDown","RightButtonDown");
wishbtn:SetScript("OnClick", function(self, btnclick)AtlasLoot:WishListButton("","","","","",self,true,btnclick) end);
wishbtn:SetText(AL["Wishlist"]);
wishbtn:SetScript("OnEnter", function(self)
GameTooltip:ClearLines();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 5);
GameTooltip:AddLine("Right Click For Menu");
GameTooltip:Show();
end);
wishbtn:SetScript("OnLeave", function()
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
end);
--Quick Look Buttons
local function presetcreate(preset,num)
preset:SetSize(105,20);
preset:SetScript("OnEnter", function(self)
if self:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 5);
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][num][6]);
GameTooltip:Show();
end
end);
preset:SetScript("OnLeave", function()
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
end);
preset:SetScript("OnClick", function()
if AtlasLoot:IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][num][4]) then
ATLASLOOT_LASTMODULE = AtlasLootCharDB["QuickLooks"][num][4];
ATLASLOOT_CURRENTTABLE = AtlasLootCharDB["QuickLooks"][num][5];
if AtlasLootCharDB["QuickLooks"][num][2] == "AtlasLootWishList" then
AtlasLoot:ShowWishList(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][3]);
else
AtlasLoot:ShowItemsFrame(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][2], AtlasLootCharDB["QuickLooks"][num][3]);
end
end
end);
preset:SetScript("OnShow", function(self)
self:SetText(AL["QuickLook"].." "..num);
if ((not AtlasLootCharDB["QuickLooks"][num]) or (not AtlasLootCharDB["QuickLooks"][num][1])) or (AtlasLootCharDB["QuickLooks"][num][1]==nil) then
self:Disable();
end
end);
end
--QuickLook Button 1
local presetsize = 3.75;
local preset1 = CreateFrame("Button", "AtlasLootDefaultFrame_Preset1", AtlasLootDefaultFrame, "OptionsButtonTemplate");
presetcreate(preset1,1);
preset1:SetPoint("LEFT", AtlasLootDefaultFrameWishListButton, "RIGHT", presetsize, 0);
--QuickLook Button 2
local preset2 = CreateFrame("Button", "AtlasLootDefaultFrame_Preset2", AtlasLootDefaultFrame, "OptionsButtonTemplate");
presetcreate(preset2,2);
preset2:SetPoint("LEFT", "AtlasLootDefaultFrame_Preset1", "RIGHT", presetsize, 0);
--QuickLook Button 3
local preset3 = CreateFrame("Button", "AtlasLootDefaultFrame_Preset3", AtlasLootDefaultFrame, "OptionsButtonTemplate");
presetcreate(preset3,3);
preset3:SetPoint("LEFT", "AtlasLootDefaultFrame_Preset2", "RIGHT", presetsize, 0);
--QuickLook Button 4
local preset4 = CreateFrame("Button", "AtlasLootDefaultFrame_Preset4", AtlasLootDefaultFrame, "OptionsButtonTemplate");
presetcreate(preset4,4);
preset4:SetPoint("LEFT", "AtlasLootDefaultFrame_Preset3", "RIGHT", presetsize, 0);
--Search Edit Box
local searchbox = CreateFrame("EditBox","AtlasLootDefaultFrameSearchBox",AtlasLootDefaultFrame,"InputBoxTemplate");
searchbox:SetSize(190,32);
searchbox:SetMaxLetters(100);
searchbox:SetAutoFocus(false);
searchbox:SetPoint("TOPLEFT",AtlasLootDefaultFrameWishListButton,"BOTTOMLEFT",7,-3)
searchbox:SetTextInsets(0, 8, 0, 0);
searchbox:SetScript("OnEnterPressed", function(self)
AtlasLoot:Search(self:GetText());
self:ClearFocus();
end)
local fstring = searchbox:CreateFontString("AtlasLootDefaultFrameSearchString", "ARTWORK", "GameFontNormal");
--Search Button
local searchbtn = CreateFrame("Button","AtlasLootDefaultFrameSearchButton",AtlasLootDefaultFrame,"UIPanelButtonTemplate2");
searchbtn:SetSize(69,32);
searchbtn:SetPoint("LEFT","AtlasLootDefaultFrameSearchBox","RIGHT",2,0);
searchbtn:SetText(AL["Search"]);
searchbtn:SetScript("OnClick", function()
AtlasLoot:Search(AtlasLootDefaultFrameSearchBox:GetText());
AtlasLootDefaultFrameSearchBox:ClearFocus();
end);
--Search Options Button
local searchopt = CreateFrame("Button", "AtlasLootDefaultFrameSearchOptionsButton", AtlasLootDefaultFrameSearchButton);
searchopt:SetSize(28,28);
searchopt:SetPoint("LEFT","AtlasLootDefaultFrameSearchButton","RIGHT",-5,0);
searchopt:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up");
searchopt:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
searchopt:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
searchopt:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight","ADD");
searchopt:SetScript("OnClick", function(self) AtlasLoot:ShowSearchOptions(self) end)
--Clear Search Button
local searchclear = CreateFrame("Button","AtlasLootDefaultFrameSearchClearButton",AtlasLootDefaultFrameSearchBox,"UIPanelButtonTemplate2");
searchclear:SetSize(58,32);
searchclear:SetPoint("LEFT",AtlasLootDefaultFrameSearchOptionsButton,"RIGHT",-2,0);
searchclear:SetText(AL["Clear"]);
searchclear:SetScript("OnClick", function()
AtlasLootDefaultFrameSearchBox:SetText("");
AtlasLootDefaultFrameSearchBox:ClearFocus();
end);
--Last Result Button
local lastresult = CreateFrame("Button","AtlasLootDefaultFrameLastResultButton",AtlasLootDefaultFrameSearchBox,"UIPanelButtonTemplate2");
lastresult:SetSize(100,32);
lastresult:SetPoint("LEFT",AtlasLootDefaultFrameSearchClearButton,"RIGHT",1,0);
lastresult:SetText(AL["Last Result"]);
lastresult:SetScript("OnClick", function() AtlasLoot:ShowSearchResult() end);
-- Advanced Search Button
local advSearch = CreateFrame("Button","AtlasLootDefaultFrameAdvancedSearchButton", AtlasLootDefaultFrame,"UIPanelButtonTemplate2");
advSearch:SetSize(95,32);
advSearch:SetPoint("LEFT",AtlasLootDefaultFrameLastResultButton,"RIGHT",2);
advSearch:SetText("Advanced");
advSearch:SetScript("OnClick", function()
AtlasLoot_AdvancedSearchShow();
AtlasLootDefaultFrameSearchBox:ClearFocus();
end)
--------------------- Diffcuility ScrollFrame ----------------------------------
local ROW_HEIGHT = 16; -- How tall is each row?
local MAX_ROWS = 5; -- How many rows can be shown at once?
local scrollFrame = CreateFrame("Frame", "Atlasloot_Difficulty_ScrollFrame", AtlasLootDefaultFrame);
scrollFrame:EnableMouse(true);
scrollFrame:SetSize(265, ROW_HEIGHT * MAX_ROWS + 16);
scrollFrame:SetPoint("LEFT","AtlasLootDefaultFrame_ExpansionMenu","RIGHT",0,-39);
scrollFrame:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", tile = true, tileSize = 16,
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16,
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(hide,wishlist)
local maxValue,offset,row,value;
scrollFrame.wishList = nil;
if wishlist then
scrollFrame.wishList = wishlist;
maxValue = #AtlasLootWishList[wishlist];
FauxScrollFrame_Update(scrollFrame.scrollBar, maxValue, MAX_ROWS, ROW_HEIGHT);
offset = FauxScrollFrame_GetOffset(scrollFrame.scrollBar);
for i = 1, MAX_ROWS do
value = i + offset
scrollFrame.rows[i]:SetChecked(false);
scrollFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
if value <= maxValue and AtlasLootWishList[wishlist][value] then
row = scrollFrame.rows[i]
row:SetText("|cffFFd200"..AtlasLootWishList[wishlist][value].Name);
row.itemIndex = value;
if row.itemIndex == ATLASLOOT_CURRENT_WISHLIST_NUM then
row:SetChecked(true);
end
row:Show()
else
scrollFrame.rows[i]:Hide()
end
end
elseif AtlasLoot_Difficulty then
maxValue = #AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE];
FauxScrollFrame_Update(scrollFrame.scrollBar, maxValue, MAX_ROWS, ROW_HEIGHT);
offset = FauxScrollFrame_GetOffset(scrollFrame.scrollBar);
for i = 1, MAX_ROWS do
value = i + offset
scrollFrame.rows[i]:SetChecked(false);
scrollFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
if value <= maxValue and AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value] and hide == nil then
row = scrollFrame.rows[i]
row:SetText("|cffFFd200"..AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][1]);
row.itemIndex = AtlasLoot_Difficulty[ATLASLOOT_CURRENTTYPE][value][2];
if row.itemIndex == ItemindexID then
row:SetChecked(true);
end
row:Show()
else
scrollFrame.rows[i]:Hide()
end
end
end
end
local scrollSlider = CreateFrame("ScrollFrame","AtlasLootDefaultFrameScroll", Atlasloot_Difficulty_ScrollFrame, "FauxScrollFrameTemplate");
scrollSlider:SetPoint("TOPLEFT", 0, -8);
scrollSlider:SetPoint("BOTTOMRIGHT", -30, 8);
scrollSlider:SetScript("OnVerticalScroll", function(self, offset)
self.offset = math.floor(offset / ROW_HEIGHT + 0.5);
if scrollFrame.wishList then
AtlasLoot:ScrollFrameUpdate(nil,scrollFrame.wishList);
else
AtlasLoot:ScrollFrameUpdate();
end
end)
scrollSlider:SetScript("OnShow", function()
if scrollFrame.wishList then
AtlasLoot:ScrollFrameUpdate(nil,scrollFrame.wishList);
else
AtlasLoot:ScrollFrameUpdate();
end
end)
scrollFrame.scrollBar = scrollSlider
local rows = setmetatable({}, { __index = function(t, i)
local row = CreateFrame("CheckButton", "$parentRow"..i, scrollFrame)
row:SetSize(230, ROW_HEIGHT);
row:SetFrameStrata("Dialog");
row:SetNormalFontObject(GameFontHighlightLeft);
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
row:SetScript("OnClick", function()
if scrollFrame.wishList then
AtlasLoot:ShowWishList(scrollFrame.wishList,row.itemIndex);
AtlasLoot_CurrentWishList["Show"].ListNum = row.itemIndex;
AtlasLoot:ScrollFrameUpdate(nil,scrollFrame.wishList);
else
ItemindexID = row.itemIndex;
if not AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() then
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
end
AtlasLoot:ScrollFrameUpdate();
end
end)
if i == 1 then
row:SetPoint("TOPLEFT", scrollFrame, 8, -8)
else
row:SetPoint("TOPLEFT", scrollFrame.rows[i-1], "BOTTOMLEFT")
end
rawset(t, i, row)
return row
end })
scrollFrame.rows = rows
local MAX_ROWS2 = 26; -- How many rows can be shown at once?
--------------------Subtable Frame--------------------
local subtableFrame = CreateFrame("Frame", "Atlasloot_SubTableFrame", AtlasLootDefaultFrame);
subtableFrame:EnableMouse(true);
subtableFrame:SetSize(265, ROW_HEIGHT * MAX_ROWS2 + 23);
subtableFrame:SetPoint("BOTTOMLEFT","Atlasloot_Difficulty_ScrollFrame",0,-446);
subtableFrame:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", tile = true, tileSize = 16,
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
});
function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, tablenum)
local maxValue = #_G[dataSource][tablename];
subtableFrame.tablename = tablename;
subtableFrame.dataSource = dataSource;
subtableFrame.tablenum = tablenum;
FauxScrollFrame_Update(subtableFrame.scrollBar, maxValue, MAX_ROWS2, ROW_HEIGHT);
local offset = FauxScrollFrame_GetOffset(subtableFrame.scrollBar);
for i = 1, MAX_ROWS2 do
local value = i + offset
subtableFrame.rows[i]:SetChecked(false);
subtableFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
if value <= maxValue and _G[dataSource][tablename][value] and tablename ~= "SearchMENU" then
local row = subtableFrame.rows[i]
row.dataSource = dataSource;
row.tablename = tablename;
row.tablenum = value;
if dataSource == "AtlasLoot_MapData" then
row.Text:SetText(_G[dataSource][tablename][value][1]);
row:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_TOP");
GameTooltip:SetText(_G[dataSource][tablename][value][1]);
GameTooltip:Show();
end)
row:SetScript("OnLeave", function() GameTooltip:Hide() end)
else
row.Text:SetText("|cffFFd200".._G[dataSource][tablename][value].Name);
row:SetScript("OnEnter", function(self)
GameTooltip:Hide();
end)
if tablenum == value and dataSource ~= "AtlasLoot_MapData" then
row:SetChecked(true);
end
end
row:Show();
else
subtableFrame.rows[i]:Hide();
end
end
end
local scrollSlider2 = CreateFrame("ScrollFrame","AtlasLootDefaultFrameSubTableScroll",Atlasloot_SubTableFrame,"FauxScrollFrameTemplate");
scrollSlider2:SetPoint("TOPLEFT", 0, -8)
scrollSlider2:SetPoint("BOTTOMRIGHT", -30, 8)
scrollSlider2:SetScript("OnVerticalScroll", function(self, offset)
self.offset = math.floor(offset / ROW_HEIGHT + 0.5)
AtlasLoot:SubTableScrollFrameUpdate(subtableFrame.tablename, subtableFrame.dataSource, subtableFrame.tablenum);
end)
subtableFrame.scrollBar = scrollSlider2
local rows2 = setmetatable({}, { __index = function(t, i)
local row = CreateFrame("CheckButton", "$parentRow"..i, subtableFrame)
row:SetSize(230, ROW_HEIGHT);
row:SetFrameStrata("Dialog");
row:SetNormalFontObject(GameFontHighlightLeft);
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
row.Text = row:CreateFontString("$parentRow"..i.."Text","OVERLAY","GameFontNormal");
row.Text:SetSize(230, ROW_HEIGHT);
row.Text:SetPoint("LEFT",row);
row.Text:SetJustifyH("LEFT");
row:SetScript("OnClick", function()
if row.dataSource ~= "AtlasLoot_MapData" then
AtlasLoot:ShowItemsFrame(row.tablename, row.dataSource, row.tablenum);
else
row:SetChecked(false);
end
end)
if i == 1 then
row:SetPoint("TOPLEFT", subtableFrame, 8, -8)
else
row:SetPoint("TOPLEFT", subtableFrame.rows[i-1], "BOTTOMLEFT")
end
rawset(t, i, row)
return row
end })
subtableFrame.rows = rows2
--------------------------------- Atlas Map and map buttons -----------------------------------------------
--Atlas Map
local map = CreateFrame("Frame", "AtlasLootDefaultFrame_Map", AtlasLootDefaultFrame);
map:SetSize(540,515);
map:SetPoint("BOTTOMLEFT", AtlasLootDefaultFrame, "BOTTOMLEFT",40,90);
map:SetFrameStrata("HIGH");
map:Hide();
map:EnableMouse();
map:SetScript("OnMouseDown", function(self, button)
if button == "RightButton" then
AtlasLoot:MapOnShow();
end
end);
-- Map Button
local mapbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
mapbtn:SetSize(90,24);
mapbtn:SetPoint("BOTTOMLEFT",Atlasloot_SubTableFrame,0,-27.5);
mapbtn:SetText("Map");
mapbtn:SetScript("OnClick", function() AtlasLoot:MapOnShow(); end)
-- Map Select Button
local mapSelbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapSelectButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
mapSelbtn:SetSize(180,24);
mapSelbtn:SetPoint("BOTTOMRIGHT",Atlasloot_SubTableFrame,5,-27.5);
mapSelbtn:SetScript("OnClick", function(self)
if AtlasLoot_MapMenu:IsOpen() then
AtlasLoot_MapMenu:Close();
else
AtlasLoot_MapMenu:Open(self);
end
end);
mapSelbtn:SetText("No Map");
-- Load Current Instance Button
local currentInstance = CreateFrame("Button","AtlasLootDefaultFrame_LoadInstanceButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
currentInstance:SetSize(283,24);
currentInstance:SetPoint("BOTTOMRIGHT",Atlasloot_SubTableFrame,10,-58);
currentInstance:SetScript("OnClick", function() AtlasLoot:ShowInstance(); end)
currentInstance:SetText("Load Current Instance");
+6
View File
@@ -0,0 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AtlaslootDefaultFrameCreate.lua"/>
<Script file="AtlaslootDefaultFrame.lua"/>
<Script file="AtlasLootAdvancedSearchCreate.lua"/>
</Ui>