From 847294076e8c527fa28c2acf51ef18793ec8353d Mon Sep 17 00:00:00 2001 From: Anch Date: Wed, 12 Oct 2022 19:24:48 +1300 Subject: [PATCH] renamed divider customheader renamed divider customheader and added setframestrata to scroll frames --- AtlasLoot/Core/LootButtons.lua | 4 ++-- AtlasLoot/Core/WishList.lua | 14 +++++++------- .../DefaultFrame/AtlaslootDefaultFrameCreate.lua | 8 +++++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/AtlasLoot/Core/LootButtons.lua b/AtlasLoot/Core/LootButtons.lua index 5ccbbf2..c0f7489 100644 --- a/AtlasLoot/Core/LootButtons.lua +++ b/AtlasLoot/Core/LootButtons.lua @@ -224,8 +224,8 @@ function AtlasLootItem_OnClick(self ,arg1) if arg1=="RightButton" and ATLASLOOT_ITEM_UNLOCK then AtlasLoot:MoveWishlistItem("Down",self.number); elseif IsAltKeyDown() and arg1=="LeftButton" and ATLASLOOT_ITEM_UNLOCK then - StaticPopup_Show ("ATLASLOOT_ADD_DIVIDER"); - StaticPopupDialogs.ATLASLOOT_ADD_DIVIDER.num = self.number; + StaticPopup_Show ("ATLASLOOT_ADD_CUSTOMHEADER"); + StaticPopupDialogs.ATLASLOOT_ADD_CUSTOMHEADER.num = self.number; elseif (arg1=="LeftButton") and ATLASLOOT_ITEM_UNLOCK then AtlasLoot:MoveWishlistItem("Up",self.number); elseif(arg1=="RightButton" and not iteminfo and self.itemID ~= 0) then diff --git a/AtlasLoot/Core/WishList.lua b/AtlasLoot/Core/WishList.lua index fe4a210..14a23b0 100644 --- a/AtlasLoot/Core/WishList.lua +++ b/AtlasLoot/Core/WishList.lua @@ -106,8 +106,8 @@ local function CloneTable(t) -- return a copy of the table t return new; end --- Add divider -function AtlasLoot:AddItemDivider(num,text) +-- Add CustomHeader +function AtlasLoot:AddItemCustomHeader(num,text) for i,v in ipairs(AtlasLootWishList[AtlasLoot_CurrentWishList["Show"].ListType][AtlasLoot_CurrentWishList["Show"].ListNum]) do if num <= v[1] then v[1] = v[1] + 1; @@ -1050,11 +1050,11 @@ StaticPopupDialogs["ATLASLOOT_SEND_WISHLIST"] = { }; --[[ -StaticPopupDialogs["ATLASLOOT_ADD_DIVIDER"] -This is shown, if you want too add a divider to a wishlist +StaticPopupDialogs["ATLASLOOT_ADD_CUSTOMHEADER"] +This is shown, if you want too add a CustomHeader to a wishlist ]] -StaticPopupDialogs["ATLASLOOT_ADD_DIVIDER"] = { - text = "Add text for a divider or leave blank for a blank", +StaticPopupDialogs["ATLASLOOT_ADD_CUSTOMHEADER"] = { + text = "Add text for a Custom Header or leave blank for a blank", button1 = "Set Text", button2 = AL["Cancel"], OnShow = function(self) @@ -1062,7 +1062,7 @@ StaticPopupDialogs["ATLASLOOT_ADD_DIVIDER"] = { end, OnAccept = function() local text = _G[this:GetParent():GetName().."EditBox"]:GetText(); - AtlasLoot:AddItemDivider(StaticPopupDialogs.ATLASLOOT_ADD_DIVIDER.num,text); + AtlasLoot:AddItemCustomHeader(StaticPopupDialogs.ATLASLOOT_ADD_CUSTOMHEADER.num,text); end, hasEditBox = 1, timeout = 0, diff --git a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua index 2318613..37e3da5 100644 --- a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua +++ b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua @@ -216,7 +216,7 @@ local lockbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_UnLock", Atl GameTooltip:AddLine("Toggle Item Moving"); GameTooltip:AddLine("Left Click to move item up"); GameTooltip:AddLine("Right Click to move item down"); - GameTooltip:AddLine("Alt + Left Click to add a divider"); + GameTooltip:AddLine("Alt + Left Click to add a Custom Header"); GameTooltip:Show(); end); lockbtn:SetScript("OnLeave", function() @@ -563,6 +563,7 @@ scrollFrame.scrollBar = scrollSlider local rows = setmetatable({}, { __index = function(t, i) local row = CreateFrame("CheckButton", "$parentRow"..i, scrollFrame) row:SetSize(230, ROW_HEIGHT); + row:SetFrameStrata("Dialog"); row:SetNormalFontObject(GameFontHighlightLeft); row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); row:SetScript("OnClick", function() @@ -655,8 +656,9 @@ local scrollSlider2 = CreateFrame("ScrollFrame","AtlasLootDefaultFrameSubTableSc local rows2 = setmetatable({}, { __index = function(t, i) local row = CreateFrame("CheckButton", "$parentRow"..i, subtableFrame) - row:SetSize(230, ROW_HEIGHT) - row:SetNormalFontObject(GameFontHighlightLeft) + row:SetSize(230, ROW_HEIGHT); + row:SetFrameStrata("Dialog"); + row:SetNormalFontObject(GameFontHighlightLeft); row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); row.Text = row:CreateFontString("$parentRow"..i.."Text","OVERLAY","GameFontNormal"); row.Text:SetSize(230, ROW_HEIGHT);