renamed divider customheader

renamed divider customheader and added setframestrata to scroll frames
This commit is contained in:
Anch
2022-10-12 19:24:48 +13:00
parent 5f49791885
commit 847294076e
3 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -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
+7 -7
View File
@@ -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,
@@ -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);