diff --git a/AtlasLoot/AtlasLoot.toc b/AtlasLoot/AtlasLoot.toc index b2f8a8c..a8f7c8b 100644 --- a/AtlasLoot/AtlasLoot.toc +++ b/AtlasLoot/AtlasLoot.toc @@ -1,9 +1,9 @@ ## Interface: 30300 ## Title: AtlasLoot Ascension Edition ## Notes: Shows the possible loot from the bosses -## Author: Original: Hegarol, Ascension: Skray/Szyler/Anch/Rvng -## Version: v6.4.2 -## X-eMail: manager@atlasloot.net +## Author: v7 Rebuid Done by: Anch/Rvng (Original: Hegarol, Ascension: Skray/Szyler/Anch/Rvng) +## Version: v7.0.0 +## X-eMail: ## X-Credits: Daviesh, Lag, Cellelach, Asurn, Pernicus and many others. ## X-Category: Map ## X-License: GPL v2 diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 5d8dfa8..f1acc0f 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -716,11 +716,18 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum) _G["AtlasLootItemsFrame_PREV"]:Hide(); _G["AtlasLootItemsFrame_Wishlist_Options"]:Hide(); _G["AtlasLootItemsFrame_Wishlist_Share"]:Hide(); + _G["AtlasLootItemsFrame_Wishlist_Swap"]:Hide(); -- Show Wishlist buttons when a wishlist in showing if dataSource_backup == "AtlasLootWishList" then _G["AtlasLootItemsFrame_Wishlist_Options"]:Show(); _G["AtlasLootItemsFrame_Wishlist_Share"]:Show(); + _G["AtlasLootItemsFrame_Wishlist_Swap"]:Show(); + if dataID == "Shared" then + AtlasLootItemsFrame_Wishlist_Swap:SetText("Own"); + elseif dataID == "Own" then + AtlasLootItemsFrame_Wishlist_Swap:SetText("Shared"); + end end local tablebase = {dataID, dataSource_backup}; diff --git a/AtlasLoot/Core/WishList.lua b/AtlasLoot/Core/WishList.lua index 1a33977..7994e9d 100644 --- a/AtlasLoot/Core/WishList.lua +++ b/AtlasLoot/Core/WishList.lua @@ -132,6 +132,21 @@ function AtlasLoot:ShareWishList() StaticPopup_Show ("ATLASLOOT_SEND_WISHLIST",AtlasLootWishList["Own"][AtlasLootItemsFrame.refresh[3]].Name); end +--[[ +AtlasLoot:WishListSwapButton +Main panel wishlistswap button + ]] + function AtlasLoot:WishListSwapButton(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show) + if AtlasLootItemsFrame.refresh[1] == "Own" then + if AtlasLootWishList["Shared"][1] then + AtlasLoot_WishListAddDropClick("addShared", 1, "", show); + AtlasLootItemsFrame_Wishlist_Swap:SetText("Own"); + end + elseif AtlasLootItemsFrame.refresh[1] == "Shared" then + AtlasLoot_WishListAddDropClick("addOwn", AtlasLootWishList["Options"][playerName]["DefaultWishList"][3] or 1, "", show); + AtlasLootItemsFrame_Wishlist_Swap:SetText("Shared"); + end +end --[[ AtlasLoot:WishListButton @@ -362,7 +377,7 @@ function AtlasLoot:WishListOptionsRegister() end if AtlasLootItemsFrame.refresh[1] == "Own" then AtlasLoot_WishListOptions:AddLine( - "text", AL["Make Default Wishlist"], + "text", AL["Make Wishlist Default"], "func", function() AtlasLoot:SetDefaultWishList() end, "notCheckable", true ); diff --git a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua index 406c65e..623f3bf 100644 --- a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua +++ b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua @@ -177,9 +177,15 @@ local backbtn = CreateFrame("Button", "AtlasLootItemsFrame_BACK", AtlasLootItems 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",0,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", "BOTTOM",-50,4); + optionsbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Swap", "BOTTOM",-100,0); optionsbtn:SetText(AL["Options"]); optionsbtn:SetScript("OnClick", function(self) if AtlasLoot_WishListOptions:IsOpen() then @@ -192,7 +198,7 @@ local optionsbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Options", -- Wishlist Share button local sharebtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Share", AtlasLootItemsFrame, "OptionsButtonTemplate"); - sharebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Options", "BOTTOM",100,0); + sharebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Swap", "BOTTOM",100,0); sharebtn:SetText(AL["Share"]); sharebtn:SetScript("OnClick", function() AtlasLoot:ShareWishList() end) sharebtn:Hide(); diff --git a/AtlasLoot/Locales/constants.en.lua b/AtlasLoot/Locales/constants.en.lua index 6fb59dd..b6d1686 100644 --- a/AtlasLoot/Locales/constants.en.lua +++ b/AtlasLoot/Locales/constants.en.lua @@ -300,7 +300,7 @@ if AL then AL["Add Wishlist"] = true; AL["Edit Wishlist"] = true; AL["Copy Wishlist To Own"] = true; - AL["Make Default Wishlist"] = true; + AL["Make Wishlist Default"] = true; AL["Delete Wishlist"] = true; AL["Show More Icons"] = true; AL["Wishlist name:"] = true;