wishlist swap button

--added button to swap between own/shared wishlists
--updated version number to 7.0
This commit is contained in:
Anch
2022-09-21 13:55:18 +12:00
parent 40dd46a262
commit ef907c7321
5 changed files with 35 additions and 7 deletions
+3 -3
View File
@@ -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
+7
View File
@@ -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};
+16 -1
View File
@@ -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
);
@@ -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();
+1 -1
View File
@@ -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;