untied back button from rest of the nav buttons

This commit is contained in:
Anch
2022-03-20 22:10:46 +13:00
parent 5fe9575a19
commit 01853a4d73
3 changed files with 23 additions and 3 deletions
+20 -1
View File
@@ -1149,9 +1149,28 @@ end
--[[
AtlasLoot_NavButton_OnClick:
Called when <-, -> or 'Back' are pressed and calls up the appropriate loot page
Called when <-, -> are pressed and calls up the appropriate loot page
]]
function AtlasLoot_NavButton_OnClick()
if AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refresh[4] then
if strsub(this.lootpage, 1, 16) == "SearchResultPage" then
AtlasLoot_ShowItemsFrame("SearchResult", this.lootpage, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), AtlasLootItemsFrame.refresh[4]);
elseif strsub(this.lootpage, 1, 12) == "WishListPage" then
AtlasLoot_ShowItemsFrame("WishList", this.lootpage, AL["Wishlist"], AtlasLootItemsFrame.refresh[4]);
else
AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], "", AtlasLootItemsFrame.refresh[4]);
end
else
--Fallback for if the requested loot page is a menu and does not have a .refresh instance
AtlasLoot_ShowItemsFrame(this.lootpage, "", "", AtlasFrame);
end
end
--[[
AtlasLoot_NavButton_OnClick:
Called when 'Back'Button is pressed and calls up the appropriate loot page
]]
function AtlasLoot_BackButton_OnClick()
if AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refresh[4] then
if strsub(this.lootpage, 1, 16) == "SearchResultPage" then
AtlasLoot_ShowItemsFrame("SearchResult", this.lootpage, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), AtlasLootItemsFrame.refresh[4]);
+2 -2
View File
@@ -166,7 +166,7 @@
<Button name="AtlasLootClassButtonTemplate" inherits="OptionsButtonTemplate" virtual="true" hidden="true">
<Scripts>
<OnClick>
AtlasLoot_NavButton_OnClick()
AtlasLoot_BackButton_OnClick()
</OnClick>
<OnShow>
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
@@ -618,7 +618,7 @@
</Anchors>
<Scripts>
<OnClick>
AtlasLoot_NavButton_OnClick()
AtlasLoot_NavButton_OnClick()
</OnClick>
<OnShow>
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
+1
View File
@@ -42,6 +42,7 @@ if AL then
AL["Show Normal Loot"] = true;
AL["Show Heroic/Ascended Loot"] = true;
AL["Bloodforged"] = true;
AL["Factions - Original WoW"] = true;
AL["Factions - Classic"] = true;
AL["Factions - Burning Crusade"] = true;
AL["Factions - Wrath of the Lich King"] = true;