added another way to enable back button
-added another way to enable back button -added page save variables for back button
This commit is contained in:
@@ -52,6 +52,7 @@ ATLASLOOT_DEBUGSHOWN = false;
|
||||
ATLASLOOT_FILTER_ENABLE = false;
|
||||
ATLASLOOT_CURRENTTYPE = "Default";
|
||||
ATLASLOOT_TYPE = {};
|
||||
ATLASLOOT_BACKENABLED = false;
|
||||
|
||||
-- Colours stored for code readability
|
||||
local GREY = "|cff999999";
|
||||
@@ -725,8 +726,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum)
|
||||
|
||||
if (dataID == "SearchResult" or dataSource_backup == "AtlasLoot_CurrentWishList") and dataSource[dataID][tablenum][i][8] then
|
||||
itemButton.sourcePage = dataSource[dataID][tablenum][i][8];
|
||||
elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=LT=") then
|
||||
elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=TT=") then
|
||||
itemButton.sourcePage = string.sub(dataSource[dataID][tablenum][i][8], 5);
|
||||
elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=LT=") then
|
||||
itemButton.sourcePage = dataSource[dataID][tablenum][i][8];
|
||||
else
|
||||
itemButton.sourcePage = nil;
|
||||
end
|
||||
@@ -819,10 +822,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum)
|
||||
_G["AtlasLootItemsFrame_PREV"].tablebase = tablebase;
|
||||
end
|
||||
|
||||
if dataSource[dataID].Back then
|
||||
if dataSource[dataID].Back or ATLASLOOT_BACKENABLED then
|
||||
_G["AtlasLootItemsFrame_BACK"]:Show();
|
||||
else
|
||||
AtlasLootItemsFrame.refreshBack = {dataID, dataSource_backup, tablenum};
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--Anchor the item frame where it is supposed to be
|
||||
@@ -853,7 +857,8 @@ AtlasLoot:NavButton_OnClick:
|
||||
Called when 'Back'Button is pressed and calls up the appropriate loot page
|
||||
]]
|
||||
function AtlasLoot:BackButton_OnClick()
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3]);
|
||||
ATLASLOOT_BACKENABLED = false;
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshBack[1], AtlasLootItemsFrame.refreshBack[2], AtlasLootItemsFrame.refreshBack[3]);
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
+24
-23
@@ -20,26 +20,6 @@ AtlasLoot_FilterMenu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_SetFiltersMenu = AceLibrary("Dewdrop-2.0");
|
||||
|
||||
local FilterTable = {
|
||||
{
|
||||
Name = AL["Primary Stats"],
|
||||
Type = "PrimaryStat",
|
||||
{"Strength", "ITEM_MOD_STRENGTH_SHORT"},
|
||||
{"Agility", "ITEM_MOD_AGILITY_SHORT"},
|
||||
{"Intellect", "ITEM_MOD_INTELLECT_SHORT"},
|
||||
{"Spirit", "ITEM_MOD_SPIRIT_SHORT"}
|
||||
},
|
||||
{
|
||||
Name = AL["Secondary Stats"],
|
||||
Type = "Stat",
|
||||
{"Attack Power", "ITEM_MOD_ATTACK_POWER_SHORT"},
|
||||
{"Spell Power", "ITEM_MOD_SPELL_POWER_SHORT"},
|
||||
{"Crit", "ITEM_MOD_CRIT_RATING_SHORT"},
|
||||
{"Hit", "ITEM_MOD_HIT_RATING_SHORT"},
|
||||
{"Haste", "ITEM_MOD_HASTE_RATING_SHORT"},
|
||||
{"Expertise", "ITEM_MOD_EXPERTISE_RATING_SHORT"},
|
||||
{"Armor Pen", "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT"},
|
||||
{"Spell Pen", "ITEM_MOD_SPELL_PENETRATION_SHORT"}
|
||||
},
|
||||
{
|
||||
Name = AL["Armor Type"],
|
||||
Type = "ArmorType",
|
||||
@@ -69,6 +49,26 @@ local FilterTable = {
|
||||
{"Ring", "INVTYPE_FINGER"},
|
||||
{"Trinket", "INVTYPE_TRINKET"}
|
||||
},
|
||||
{
|
||||
Name = AL["Secondary Stats"],
|
||||
Type = "Stat",
|
||||
{"Attack Power", "ITEM_MOD_ATTACK_POWER_SHORT"},
|
||||
{"Spell Power", "ITEM_MOD_SPELL_POWER_SHORT"},
|
||||
{"Crit", "ITEM_MOD_CRIT_RATING_SHORT"},
|
||||
{"Hit", "ITEM_MOD_HIT_RATING_SHORT"},
|
||||
{"Haste", "ITEM_MOD_HASTE_RATING_SHORT"},
|
||||
{"Expertise", "ITEM_MOD_EXPERTISE_RATING_SHORT"},
|
||||
{"Armor Pen", "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT"},
|
||||
{"Spell Pen", "ITEM_MOD_SPELL_PENETRATION_SHORT"}
|
||||
},
|
||||
{
|
||||
Name = AL["Primary Stats"],
|
||||
Type = "PrimaryStat",
|
||||
{"Strength", "ITEM_MOD_STRENGTH_SHORT"},
|
||||
{"Agility", "ITEM_MOD_AGILITY_SHORT"},
|
||||
{"Intellect", "ITEM_MOD_INTELLECT_SHORT"},
|
||||
{"Spirit", "ITEM_MOD_SPIRIT_SHORT"}
|
||||
},
|
||||
{
|
||||
Name = AL["Defensive Stats"],
|
||||
Type = "Stat",
|
||||
@@ -119,8 +119,8 @@ function AtlasLoot:HideFilteredItems()
|
||||
local filterSelect3, filterSelect2,_ , filterSelect1 = select(6,GetItemInfo(itemID));
|
||||
local filter1 = AtlasLootFilterDB["FilterLists"][AtlasLootCharDB.SelectedFilter][filterSelect1];
|
||||
local filter2 = AtlasLootFilterDB["FilterLists"][AtlasLootCharDB.SelectedFilter][filterSelect2];
|
||||
if filter1 and filter1[1] and filter1[3] == "InvType" and getStats(itemID,"Stat") or
|
||||
filter2 and filter2[1] and filter2[3] == "ArmorType" and getStats(itemID,"Stat")
|
||||
if (filter1 and filter1[1] and filter1[3] == "InvType" and getStats(itemID,"Stat")) or
|
||||
(filter2 and filter2[1] and filter2[3] == "ArmorType" and getStats(itemID,"Stat"))
|
||||
then
|
||||
return true;
|
||||
else
|
||||
@@ -267,7 +267,7 @@ function AtlasLoot:OpenFilterCreate()
|
||||
filterCatLable:Show();
|
||||
if count == 1 then
|
||||
filterCatLable:SetPoint("TOP", "AtlasLootItemsFrame", "TOP",-150,-90);
|
||||
elseif count == 15 then
|
||||
elseif count == 16 then
|
||||
filterCatLable:SetPoint("TOP", "AtlasLootItemsFrame", "TOP",0,-90);
|
||||
elseif count == 30 then
|
||||
filterCatLable:SetPoint("TOP", "AtlasLootItemsFrame", "TOP",150,-90);
|
||||
@@ -314,6 +314,7 @@ function AtlasLoot:OpenFilterCreate()
|
||||
end
|
||||
AtlasLootFilterSelect:Show();
|
||||
AtlasLootFilterCreate:Show();
|
||||
AtlasLootFilterDelete:Show();
|
||||
|
||||
--Ditch the Quicklook selector
|
||||
AtlasLootQuickLooksButton:Hide();
|
||||
|
||||
@@ -154,15 +154,6 @@ function AtlasLootItem_OnEnter(self)
|
||||
if((AtlasLoot.db.profile.EquipCompare and ((not EquipCompare_RegisterTooltip) or (not EquipCompare_Enabled)))) or IsShiftKeyDown() then
|
||||
AtlasLootItem_ShowCompareItem(self); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
end
|
||||
--[[ else
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:ClearLines();
|
||||
AtlasLootTooltip:AddLine(RED..AL["Item Unavailable"], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(AL["self item is unsafe. To view self item without the risk of disconnection, you need to have first seen it in the game world. This is a restriction enforced by Blizzard since Patch 1.10."], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(" ");
|
||||
AtlasLootTooltip:AddLine(AL["You can right-click to attempt to query the server. You may be disconnected."], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:Show(); ]]
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -264,6 +255,12 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot:ShowItemsFrame(dataID, "AtlasLoot_Data", tonumber(dataPage));
|
||||
end
|
||||
elseif( self.sourcePage and self.sourcePage:match("=LT=") ) then
|
||||
local dataID, dataSource, dataPage = strsplit("|", string.sub(self.sourcePage, 5));
|
||||
if(dataID and dataSource) then
|
||||
ATLASLOOT_BACKENABLED = true;
|
||||
AtlasLoot:ShowItemsFrame(dataID, "AtlasLoot_Data", tonumber(dataPage));
|
||||
end
|
||||
elseif (arg1=="LeftButton") and self.sourcePage then
|
||||
--Create token table if there isnt one
|
||||
if AtlasLoot_TokenData[self.sourcePage] == nil then
|
||||
@@ -297,6 +294,12 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot:ShowItemsFrame(dataID, "AtlasLoot_Data", tonumber(dataPage));
|
||||
end
|
||||
elseif( self.sourcePage and self.sourcePage:match("=LT=") ) then
|
||||
local dataID, dataSource, dataPage = strsplit("|", string.sub(self.sourcePage, 5));
|
||||
if(dataID and dataSource) then
|
||||
ATLASLOOT_BACKENABLED = true;
|
||||
AtlasLoot:ShowItemsFrame(dataID, "AtlasLoot_Data", tonumber(dataPage));
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -89,6 +89,7 @@ Called when a button in AtlasLoot_Dewdrop is clicked
|
||||
]]
|
||||
function AtlasLoot:DewDropClick(tablename, text, tablenum)
|
||||
ATLASLOOT_FILTER_ENABLE = false;
|
||||
ATLASLOOT_BACKENABLED = false;
|
||||
AtlasLootFilterCheck:SetChecked(false);
|
||||
tablename = tablename .. AtlasLoot_Expac;
|
||||
ATLASLOOT_CURRENTTABLE = tablename;
|
||||
@@ -114,6 +115,7 @@ text - Heading for the loot table
|
||||
Called when a button in AtlasLoot_DewdropSubMenu is clicked
|
||||
]]
|
||||
function AtlasLoot:DewDropSubMenuClick(tablename)
|
||||
ATLASLOOT_BACKENABLED = false;
|
||||
--Show the select loot table
|
||||
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
|
||||
--Show the table that has been selected
|
||||
@@ -123,11 +125,12 @@ 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
|
||||
expansion - expansion to load
|
||||
name - label for the expansion
|
||||
Called when a button in DewdropExpansionMenuClick is clicked
|
||||
]]
|
||||
function AtlasLoot:DewdropExpansionMenuClick(expansion, name)
|
||||
ATLASLOOT_BACKENABLED = false;
|
||||
AtlasLootDefaultFrame_ExpansionMenu:SetText(name);
|
||||
AtlasLoot_DewdropExpansionMenu:Close(1);
|
||||
AtlasLoot_Expac = expansion;
|
||||
|
||||
Reference in New Issue
Block a user