From 815ad7141ebb8e8adbac91763a80ce8d80884184 Mon Sep 17 00:00:00 2001 From: Spit <19otari98@gmail.com> Date: Tue, 6 May 2025 19:21:51 +0300 Subject: [PATCH] 3.1.6 fixed bugs after relogging/reloading UI when last opened page was WishList or Search removed redundant menu of world epics, removed fashion table (I don't see the point of keeping it since you can preview everything in the turtle shop itself anyway) tooltip source is now more accurate and lighter on performance moved buttons in atlasloot panel in Atlas to save some space --- AtlasLoot.toc | 2 +- Core/AtlasLoot.lua | 186 +++++++++++++-------- Core/AtlasLoot.xml | 373 +++++++++---------------------------------- Core/Factions.lua | 2 +- Core/Search.lua | 126 ++++++++------- Core/Sets.lua | 4 +- Core/TextParsing.lua | 22 +-- Core/Tooltip.lua | 40 ++--- Core/WishList.lua | 9 +- 9 files changed, 306 insertions(+), 458 deletions(-) diff --git a/AtlasLoot.toc b/AtlasLoot.toc index bd7f56c..87c9125 100644 --- a/AtlasLoot.toc +++ b/AtlasLoot.toc @@ -3,7 +3,7 @@ ## Notes: Shows possible loot from dungeon bosses and other sources. ## Author: Shagu (pfUI update code), Lexie (Turtle WoW fixes/updates), Otari (overhaul/revamp, menu changes, bugfixes/updates) ## LegacyAuthor: Daviesh, Pompa (Turtle WoW World Bosses), Xerron (Turtle WoW World Bosses), Gurky (Turtle WoW 1.16/1.16.1 Dungeons) -## Version: 3.1.5 +## Version: 3.1.6 ## SavedVariablesPerCharacter: AtlasLootCharDB ## OptionalDeps: Alphamap, AtlasLoader, LootLink, ItemSync, HewdropLib, Ace2, EquipCompare, EQCompare diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index dc3247c..6323fcc 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -47,8 +47,9 @@ local DEFAULT = "|cffFFd200"; --Establish number of boss lines in the Atlas frame for scrolling local ATLAS_LOOT_BOSS_LINES = 24; ---Set the default anchor for the loot frame to the AtlasLoot frame -AtlasLoot_AnchorFrame = AtlasLootDefaultFrame; +local Anchor_Atlas = { "TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84 } +local Anchor_AlphaMap = { "TOPLEFT", "AlphaMapAlphaMapFrame", "TOPLEFT", 0, 0 } +local Anchor_Default = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", 2, -2 } --Variables to hold hooked Atlas functions Hooked_Atlas_Refresh = nil; @@ -115,7 +116,7 @@ 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 - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; + AtlasLoot_AnchorPoint = Anchor_Default; --Having the Atlas and loot browser frames shown at the same time would --cause conflicts, so I hide the Atlas frame when the loot browser appears if AtlasFrame then @@ -124,12 +125,19 @@ function AtlasLootDefaultFrame_OnShow() --Remove the selection of a loot table in Atlas AtlasLootItemsFrame.activeBoss = nil; --Set the item table to the loot table - AtlasLoot_SetItemInfoFrame(pFrame); + -- AtlasLoot_SetItemInfoFrame(AtlasLoot_AnchorPoint); --Show the last displayed loot table + if AtlasLootCharDB.LastBoss == "WishList" then + AtlasLoot_ShowWishList() + return + elseif AtlasLootCharDB.LastBoss == "SearchResult" then + AtlasLoot:ShowSearchResult() + return + end if AtlasLootItemsFrame.refresh then - AtlasLoot_ShowBossLoot(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[3], pFrame) + AtlasLoot_ShowBossLoot(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[3], AtlasLoot_AnchorPoint) else - AtlasLoot_ShowBossLoot(AtlasLootCharDB.LastBoss, AtlasLootCharDB.LastBossText, pFrame); + AtlasLoot_ShowBossLoot(AtlasLootCharDB.LastBoss, AtlasLootCharDB.LastBossText, AtlasLoot_AnchorPoint); end end @@ -431,10 +439,8 @@ function AtlasLoot_SetupForAtlas() AtlasLootPanel:ClearAllPoints(); AtlasLootPanel:SetParent(AtlasFrame); AtlasLootPanel:SetPoint("TOP", "AtlasFrame", "BOTTOM", 0, 9); - --Anchor the loot table to the Atlas frame - AtlasLoot_SetItemInfoFrame(); + AtlasLoot_AnchorPoint = Anchor_Atlas AtlasLootItemsFrame:Hide(); - AtlasLoot_AnchorFrame = AtlasFrame; end --[[ @@ -443,31 +449,30 @@ pFrame - Data structure with anchor info. Format: {Anchor Point, Relative Frame This function anchors the item frame where appropriate. The main Atlas frame can be passed instead of a custom pFrame. If no pFrame is specified, the Atlas Frame is used if Atlas is installed. ]] -function AtlasLoot_SetItemInfoFrame(pFrame) - if ( pFrame ) then - --If a pFrame is specified, use it - if(pFrame==AtlasFrame and AtlasFrame) then - AtlasLootItemsFrame:ClearAllPoints(); - AtlasLootItemsFrame:SetParent(AtlasFrame); - AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); - else - AtlasLootItemsFrame:ClearAllPoints(); - AtlasLootItemsFrame:SetParent(pFrame[2]); - AtlasLootItemsFrame:ClearAllPoints(); - AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]); - end - elseif ( AtlasFrame ) then - --If no pFrame is specified and Atlas is installed, anchor in Atlas - AtlasLootItemsFrame:ClearAllPoints(); - AtlasLootItemsFrame:SetParent(AtlasFrame); - AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); - elseif ( AtlasDefaultFrame ) then - AtlasLootItemsFrame:ClearAllPoints(); - AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame); - AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0); - end - AtlasLootItemsFrame:Show(); -end +-- function AtlasLoot_SetItemInfoFrame(pFrame) +-- if ( pFrame ) then +-- --If a pFrame is specified, use it +-- if(pFrame==AtlasFrame and AtlasFrame) then +-- AtlasLootItemsFrame:ClearAllPoints(); +-- AtlasLootItemsFrame:SetParent(AtlasFrame); +-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); +-- else +-- AtlasLootItemsFrame:ClearAllPoints(); +-- AtlasLootItemsFrame:SetParent(pFrame[2]); +-- AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]); +-- end +-- elseif ( AtlasFrame ) then +-- --If no pFrame is specified and Atlas is installed, anchor in Atlas +-- AtlasLootItemsFrame:ClearAllPoints(); +-- AtlasLootItemsFrame:SetParent(AtlasFrame); +-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); +-- elseif ( AtlasLootDefaultFrame ) then +-- AtlasLootItemsFrame:ClearAllPoints(); +-- AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame); +-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0); +-- end +-- AtlasLootItemsFrame:Show(); +-- end --[[ AtlasLoot_AtlasScrollBar_Update: @@ -710,7 +715,6 @@ function AtlasLoot_Atlas_OnShow() else AtlasLootPanel:Show(); end - pFrame = AtlasFrame; end --[[ @@ -1429,11 +1433,10 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) end end --For Alphamap and Atlas integration, show a 'close' button to hide the loot table and restore the map view - if (AtlasLootItemsFrame:GetParent() == AlphaMapAlphaMapFrame or AtlasLootItemsFrame:GetParent() == AtlasFrame) then - AtlasLootItemsFrame_CloseButton:Show(); - else - AtlasLootItemsFrame_CloseButton:Hide(); - end + AtlasLootItemsFrame_CloseButton:Hide(); + if (AtlasFrame and AtlasFrame:IsShown()) or (AlphaMapAlphaMapFrame and AlphaMapAlphaMapFrame:IsShown()) then + AtlasLootItemsFrame_CloseButton:Show(); + end local subMenu = nil local bossName = "" for k in pairs(AtlasLoot_HewdropDown_SubTables) do @@ -1458,7 +1461,28 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) AtlasLootDefaultFrame_SelectedTable:Hide() end --Anchor the item frame where it is supposed to be - AtlasLoot_SetItemInfoFrame(pFrame); + if ( pFrame ) then + --If a pFrame is specified, use it + if(pFrame==AtlasFrame and AtlasFrame) then + AtlasLootItemsFrame:ClearAllPoints(); + AtlasLootItemsFrame:SetParent(AtlasFrame); + AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); + else + AtlasLootItemsFrame:ClearAllPoints(); + AtlasLootItemsFrame:SetParent(pFrame[2]); + AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]); + end + elseif ( AtlasFrame ) then + --If no pFrame is specified and Atlas is installed, anchor in Atlas + AtlasLootItemsFrame:ClearAllPoints(); + AtlasLootItemsFrame:SetParent(AtlasFrame); + AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84); + elseif ( AtlasLootDefaultFrame ) then + AtlasLootItemsFrame:ClearAllPoints(); + AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame); + AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0); + end + AtlasLootItemsFrame:Show(); AtlasLootItemsFrameContainer:Hide() end @@ -1470,14 +1494,14 @@ tabletype - Whether the tablename indexes an actual table or needs to generate a Called when a button in AtlasLoot_Hewdrop is clicked ]] function AtlasLoot_HewdropClick(tablename, text, tabletype) - AtlasLootCharDB.LastMenu = { tablename, text, tabletype } + -- AtlasLootCharDB.LastMenu = { tablename, text, tabletype } --Definition of where I want the loot table to be shown - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; + AtlasLoot_AnchorPoint = Anchor_Default --If the button clicked was linked to a loot table if tabletype == "Table" then --Show the loot table - AtlasLoot_ShowBossLoot(tablename, text, pFrame); + AtlasLoot_ShowBossLoot(tablename, text, AtlasLoot_AnchorPoint); --Save needed info for fuure re-display of the table AtlasLootCharDB.LastBoss = tablename; AtlasLootCharDB.LastBossText = text; @@ -1490,7 +1514,7 @@ function AtlasLoot_HewdropClick(tablename, text, tabletype) --Enable the submenu button AtlasLootDefaultFrame_SubMenu:Enable(); --Show the first loot table associated with the submenu - AtlasLoot_ShowBossLoot(AtlasLoot_HewdropDown_SubTables[tablename][1][2], AtlasLoot_HewdropDown_SubTables[tablename][1][1], pFrame); + AtlasLoot_ShowBossLoot(AtlasLoot_HewdropDown_SubTables[tablename][1][2], AtlasLoot_HewdropDown_SubTables[tablename][1][1], AtlasLoot_AnchorPoint); --Save needed info for fuure re-display of the table AtlasLootCharDB.LastBoss = AtlasLoot_HewdropDown_SubTables[tablename][1][2]; AtlasLootCharDB.LastBossText = AtlasLoot_HewdropDown_SubTables[tablename][1][1]; @@ -1515,9 +1539,9 @@ Called when a button in AtlasLoot_HewdropSubMenu is clicked ]] function AtlasLoot_HewdropSubMenuClick(tablename, text) --Definition of where I want the loot table to be shown - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; + AtlasLoot_AnchorPoint = Anchor_Default --Show the select loot table - AtlasLoot_ShowBossLoot(tablename, text, pFrame); + AtlasLoot_ShowBossLoot(tablename, text, AtlasLoot_AnchorPoint); --Save needed info for fuure re-display of the table AtlasLootCharDB.LastBoss = tablename; AtlasLootCharDB.LastBossText = text; @@ -1717,19 +1741,19 @@ function AtlasLoot_OpenMenu(menuName) AtlasLootCharDB.LastBoss = this.lootpage; AtlasLootCharDB.LastBossText = menuName; if menuName == AL["Crafting"] then - AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["PvP Rewards"] then - AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["World Events"] then - AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["Collections"] then - AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["Factions"] then - AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["World Bosses"] then - AtlasLoot_ShowItemsFrame("WORLDBOSSMENU", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("WORLDBOSSMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) elseif menuName == AL["Dungeons & Raids"] then - AtlasLoot_ShowItemsFrame("DUNGEONSMENU1", "dummy", "dummy", pFrame) + AtlasLoot_ShowItemsFrame("DUNGEONSMENU1", "dummy", "dummy", AtlasLoot_AnchorPoint) end CloseDropDownMenus() end @@ -1791,7 +1815,7 @@ function AtlasLootMenuItem_OnClick() CloseDropDownMenus() AtlasLootCharDB.LastBoss = this.lootpage; AtlasLootCharDB.LastBossText = pagename; - AtlasLoot_ShowBossLoot(this.lootpage, pagename, AtlasLoot_AnchorFrame); + AtlasLoot_ShowBossLoot(this.lootpage, pagename, AtlasLoot_AnchorPoint); AtlasLootDefaultFrame_SelectedCategory:SetText(pagename); AtlasLootDefaultFrame_SelectedCategory:Show(); end @@ -1821,7 +1845,7 @@ function AtlasLoot_NavButton_OnClick() else AtlasLootCharDB.LastBoss = this.lootpage; AtlasLootCharDB.LastBossText = this.title; - AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, pFrame); + AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, AtlasLoot_AnchorPoint); if AtlasLootDefaultFrame_SelectedTable:GetText()~=nil then AtlasLootDefaultFrame_SelectedTable:SetText(AtlasLoot_BossName:GetText()) else @@ -1829,10 +1853,10 @@ function AtlasLoot_NavButton_OnClick() end end elseif AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refresh[2] then - AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, pFrame); + AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, AtlasLoot_AnchorPoint); else --Fallback for if the requested loot page is a menu and does not have a .refresh instance - AtlasLoot_ShowItemsFrame(this.lootpage, "dummy", this.title, pFrame); + AtlasLoot_ShowItemsFrame(this.lootpage, "dummy", this.title, AtlasLoot_AnchorPoint); end for k,v in pairs(AtlasLoot_MenuList) do if this.lootpage == v then @@ -1943,16 +1967,14 @@ AtlasLoot_RefreshQuickLookButtons() Enables/disables the quicklook buttons depending on what is assigned ]] 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 + for i = 1, 4 do + if (not AtlasLootCharDB["QuickLooks"][i]) or (not AtlasLootCharDB["QuickLooks"][i][1]) then getglobal("AtlasLootPanel_Preset"..i):Disable(); getglobal("AtlasLootDefaultFrame_Preset"..i):Disable(); else getglobal("AtlasLootPanel_Preset"..i):Enable(); getglobal("AtlasLootDefaultFrame_Preset"..i):Enable(); end - i=i+1; end end @@ -1961,7 +1983,7 @@ AtlasLoot_ClearQuickLookButton() Clears a quicklook button. ]] function AtlasLoot_ClearQuickLookButton(button) - if not button or button == nil then return end + if not button then return end AtlasLootCharDB["QuickLooks"][button] = nil AtlasLoot_RefreshQuickLookButtons() DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..WHITE..AL["QuickLook"].." "..button.." "..AL["has been reset!"]); @@ -1985,8 +2007,7 @@ function AtlasLoot_ShowBossLoot(dataID, boss, pFrame) else --Use the original WoW instance data by default local dataSource = AtlasLoot_TableNames[dataID][2]; - --Set anchor point, set selected table and call AtlasLoot_ShowItemsFrame - AtlasLoot_AnchorFrame = pFrame; + --Set selected table and call AtlasLoot_ShowItemsFrame AtlasLootItemsFrame.externalBoss = dataID; AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame); end @@ -3618,3 +3639,38 @@ function AtlasLoot_GetChatLink(id) color = string.sub(color, 2) return "|"..color.."|H"..itemLink.."|h["..itemName.."]|h|r" end + +function AtlasLoot_QuickLook_OnClick(id) + if IsAltKeyDown() then + AtlasLoot_ClearQuickLookButton(id) + return + end + if this:GetParent() == AtlasLootPanel then + if AtlasLootPanel:GetParent() == AtlasFrame then + AtlasLoot_AnchorPoint = Anchor_Atlas + elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then + AtlasLoot_AnchorPoint = Anchor_AlphaMap + end + else + AtlasLoot_AnchorPoint = Anchor_Default + end + AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][id][1], AtlasLootCharDB["QuickLooks"][id][2], AtlasLootCharDB["QuickLooks"][id][3], AtlasLoot_AnchorPoint); +end + +function AtlasLoot_QuickLook_OnShow(id) + this:SetText(AL["QuickLook"].." "..id) + this:SetFrameLevel(this:GetParent():GetFrameLevel() + 1) + if (not AtlasLootCharDB["QuickLooks"][id]) or (not AtlasLootCharDB["QuickLooks"][id][1]) then + this:Disable() + end +end + +function AtlasLoot_QuickLook_OnEnter(id) + if this:IsEnabled() then + GameTooltip:ClearLines() + GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5) + GameTooltip:AddLine(WHITE..AtlasLootCharDB["QuickLooks"][id][3].."|r") + GameTooltip:AddLine(AL["ALT+Click to clear"]) + GameTooltip:Show() + end +end diff --git a/Core/AtlasLoot.xml b/Core/AtlasLoot.xml index 4a98b37..4326c4f 100644 --- a/Core/AtlasLoot.xml +++ b/Core/AtlasLoot.xml @@ -242,38 +242,16 @@ - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - if this:IsEnabled() then - GameTooltip:ClearLines(); - GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5); - GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][1][3].."|r"); - GameTooltip:AddLine(AL["ALT+Click to clear"]); - GameTooltip:Show(); - end + AtlasLoot_QuickLook_OnEnter(1) - if(GameTooltip:IsVisible()) then - GameTooltip:Hide(); - end + GameTooltip:Hide() - - if IsAltKeyDown() then - AtlasLoot_ClearQuickLookButton(1); - end - - if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][1][1]) then - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; - AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], pFrame); - end + AtlasLoot_QuickLook_OnClick(1) - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - this:SetText(AL["QuickLook"].." 1"); - this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 ); - if ((not AtlasLootCharDB["QuickLooks"][1]) or (not AtlasLootCharDB["QuickLooks"][1][1])) or (AtlasLootCharDB["QuickLooks"][1][1]==nil) then - this:Disable(); - end + AtlasLoot_QuickLook_OnShow(1) @@ -287,38 +265,16 @@ - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - if this:IsEnabled() then - GameTooltip:ClearLines(); - GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5); - GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][2][3].."|r"); - GameTooltip:AddLine(AL["ALT+Click to clear"]); - GameTooltip:Show(); - end + AtlasLoot_QuickLook_OnEnter(2) - if(GameTooltip:IsVisible()) then - GameTooltip:Hide(); - end + GameTooltip:Hide() - - if IsAltKeyDown() then - AtlasLoot_ClearQuickLookButton(2); - end - - if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][2][1]) then - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; - AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], pFrame); - end + AtlasLoot_QuickLook_OnClick(2) - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - this:SetText(AL["QuickLook"].." 2"); - this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 ); - if ((not AtlasLootCharDB["QuickLooks"][2]) or (not AtlasLootCharDB["QuickLooks"][2][1])) or (AtlasLootCharDB["QuickLooks"][2][1]==nil) then - this:Disable(); - end + AtlasLoot_QuickLook_OnShow(2) @@ -332,38 +288,16 @@ - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - if this:IsEnabled() then - GameTooltip:ClearLines(); - GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5); - GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][3][3].."|r"); - GameTooltip:AddLine(AL["ALT+Click to clear"]); - GameTooltip:Show(); - end + AtlasLoot_QuickLook_OnEnter(3) - if(GameTooltip:IsVisible()) then - GameTooltip:Hide(); - end + GameTooltip:Hide() - - if IsAltKeyDown() then - AtlasLoot_ClearQuickLookButton(3); - end - - if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][3][1]) then - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; - AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], pFrame); - end + AtlasLoot_QuickLook_OnClick(3) - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - this:SetText(AL["QuickLook"].." 3"); - this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 ); - if ((not AtlasLootCharDB["QuickLooks"][3]) or (not AtlasLootCharDB["QuickLooks"][3][1])) or (AtlasLootCharDB["QuickLooks"][3][1]==nil) then - this:Disable(); - end + AtlasLoot_QuickLook_OnShow(3) @@ -377,39 +311,16 @@ - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - if this:IsEnabled() then - GameTooltip:ClearLines(); - GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5); - GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][4][3].."|r"); - GameTooltip:AddLine(AL["ALT+Click to clear"]); - GameTooltip:Show(); - end + AtlasLoot_QuickLook_OnEnter(4) - - if(GameTooltip:IsVisible()) then - GameTooltip:Hide(); - end + GameTooltip:Hide() - - if IsAltKeyDown() then - AtlasLoot_ClearQuickLookButton(4); - end - - if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][4][1]) then - pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" }; - AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], pFrame); - end + AtlasLoot_QuickLook_OnClick(4) - local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); - this:SetText(AL["QuickLook"].." 4"); - this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 ); - if ((not AtlasLootCharDB["QuickLooks"][4]) or (not AtlasLootCharDB["QuickLooks"][4][1])) or (AtlasLootCharDB["QuickLooks"][4][1]==nil) then - this:Disable(); - end + AtlasLoot_QuickLook_OnShow(4) @@ -545,11 +456,6 @@ AtlasLoot_ShowWishList(); - CloseDropDownMenus(); - AtlasLootDefaultFrame_SubMenu:Disable() - AtlasLootDefaultFrame_SelectedTable:Hide() - AtlasLootQuickLooksButton:Hide() - AtlasLoot_QuickLooks:Hide() local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -1867,7 +1773,7 @@ - + @@ -1889,7 +1795,7 @@ - + @@ -1898,7 +1804,7 @@ - + @@ -1918,7 +1824,7 @@ AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - AtlasLootWorldEventMenu(); + AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -1939,7 +1845,7 @@ AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - AtlasLootSetMenu(); + AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -1960,7 +1866,7 @@ AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - AtlasLootRepMenu(); + AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -1981,7 +1887,7 @@ AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - AtlasLootPvPMenu(); + AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -2002,7 +1908,7 @@ AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - AtlasLoot_CraftingMenu(); + AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", AtlasLoot_AnchorPoint) local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); @@ -2011,18 +1917,35 @@ - + - - - - - - - - - - - - - - - - - - - this:SetAutoFocus(false); - this:SetTextInsets(0, 8, 0, 0); - - AtlasLoot:Search(this:GetText()); - this:ClearFocus(); + AtlasLoot:Search(this:GetText()) + this:ClearFocus() - +