diff --git a/ElvUI/Modules/Bags/Bags.lua b/ElvUI/Modules/Bags/Bags.lua index 23d14a7..503610f 100644 --- a/ElvUI/Modules/Bags/Bags.lua +++ b/ElvUI/Modules/Bags/Bags.lua @@ -7,7 +7,7 @@ local LIP = LibStub("ItemPrice-1.1"); --Lua functions local _G = _G local type, ipairs, pairs, unpack, select, assert, pcall = type, ipairs, pairs, unpack, select, assert, pcall -local tinsert = table.insert +local tinsert, tremove, twipe, tmaxn = table.insert, table.remove, table.wipe, table.maxn local floor = math.floor local len, gsub, sub, match = string.len, string.gsub, string.sub, string.match --WoW API / Variables @@ -471,15 +471,25 @@ function B:Layout(isBank) local numContainerColumns = floor(containerWidth / (buttonSize + buttonSpacing)) local holderWidth = ((buttonSize + buttonSpacing) * numContainerColumns) - buttonSpacing local numContainerRows = 0 + local numBags = 0 + local numBagSlots = 0 + local bagSpacing = self.db.split.bagSpacing local countColor = E.db.bags.countFontColor E:Width(f.holderFrame, holderWidth) + local isSplit = self.db.split[isBank and "bank" or "player"] + f.totalSlots = 0 local lastButton local lastRowButton local lastContainerButton local numContainerSlots = GetNumBankSlots() + local newBag for i, bagID in ipairs(f.BagIDs) do + if isSplit then + newBag = (bagID ~= -1 or bagID ~= 0) and self.db.split["bag"..bagID] or false + end + --Bag Containers if (not isBank and bagID <= 3 ) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)) then if not f.ContainerHolder[i] then @@ -603,21 +613,36 @@ function B:Layout(isBank) f.Bags[bagID][slotID]:ClearAllPoints() end + local anchorPoint, relativePoint if lastButton then - if mod(f.totalSlots - 1, numContainerColumns) == 0 then - E:Point(f.Bags[bagID][slotID], "TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) + anchorPoint, relativePoint = (self.db.reverseSlots and "BOTTOM" or "TOP"), (self.db.reverseSlots and "TOP" or "BOTTOM") + if isSplit and newBag and slotID == 1 then + E:Point(f.Bags[bagID][slotID], anchorPoint, lastRowButton, relativePoint, 0, self.db.reverseSlots and (buttonSpacing + bagSpacing) or -(buttonSpacing + bagSpacing)) + lastRowButton = f.Bags[bagID][slotID] + numContainerRows = numContainerRows + 1 + numBags = numBags + 1 + numBagSlots = 0 + elseif isSplit and mod(numBagSlots, numContainerColumns) == 0 then + E:Point(f.Bags[bagID][slotID], anchorPoint, lastRowButton, relativePoint, 0, self.db.reverseSlots and buttonSpacing or -buttonSpacing) + lastRowButton = f.Bags[bagID][slotID] + numContainerRows = numContainerRows + 1 + elseif (not isSplit) and mod((f.totalSlots - 1) , numContainerColumns) == 0 then + E:Point(f.Bags[bagID][slotID], anchorPoint, lastRowButton, relativePoint, 0, self.db.reverseSlots and buttonSpacing or -buttonSpacing) lastRowButton = f.Bags[bagID][slotID] numContainerRows = numContainerRows + 1 else - E:Point(f.Bags[bagID][slotID], "LEFT", lastButton, "RIGHT", buttonSpacing, 0) + anchorPoint, relativePoint = (self.db.reverseSlots and "RIGHT" or "LEFT"), (self.db.reverseSlots and "LEFT" or "RIGHT") + E:Point(f.Bags[bagID][slotID], anchorPoint, lastButton, relativePoint, self.db.reverseSlots and -buttonSpacing or buttonSpacing, 0) end else - E:Point(f.Bags[bagID][slotID], "TOPLEFT", f.holderFrame, "TOPLEFT") + anchorPoint = self.db.reverseSlots and "BOTTOMRIGHT" or "TOPLEFT" + E:Point(f.Bags[bagID][slotID], anchorPoint, f.holderFrame, anchorPoint) lastRowButton = f.Bags[bagID][slotID] numContainerRows = numContainerRows + 1 end lastButton = f.Bags[bagID][slotID] + numBagSlots = numBagSlots + 1 end else for i = 1, MAX_CONTAINER_ITEMS do @@ -666,13 +691,13 @@ function B:Layout(isBank) f.keyFrame.slots[i]:ClearAllPoints() E:Size(f.keyFrame.slots[i], buttonSize) - if f.keyFrame.slots[i-1] then + if f.keyFrame.slots[i - 1] then if mod(totalSlots - 1, numKeyColumns) == 0 then E:Point(f.keyFrame.slots[i], "TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) lastRowButton = f.keyFrame.slots[i] numKeyRows = numKeyRows + 1 else - E:Point(f.keyFrame.slots[i], "RIGHT", f.keyFrame.slots[i-1], "LEFT", -buttonSpacing, 0) + E:Point(f.keyFrame.slots[i], "RIGHT", f.keyFrame.slots[i - 1], "LEFT", -buttonSpacing, 0) end else E:Point(f.keyFrame.slots[i], "TOPRIGHT", f.keyFrame, "TOPRIGHT", -buttonSpacing, -buttonSpacing) @@ -688,7 +713,7 @@ function B:Layout(isBank) E:Size(f.keyFrame, ((buttonSize + buttonSpacing) * numKeyColumns) + buttonSpacing, ((buttonSize + buttonSpacing) * numKeyRows) + buttonSpacing) end - E:Size(f, containerWidth, (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + f.topOffset + f.bottomOffset) + E:Size(f, containerWidth, (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + (isSplit and (numBags * bagSpacing) or 0 ) + f.topOffset + f.bottomOffset) -- 8 is the cussion of the f.holderFrame end function B:UpdateKeySlot(slotID) @@ -788,7 +813,14 @@ function B:OnEvent() if not this:IsShown() then return end this:UpdateCooldowns() elseif event == "PLAYERBANKSLOTS_CHANGED" then - this:UpdateAllSlots(-1) + local slot = unpack(arg) + print(event, slot) + local bagID = (slot <= NUM_BANKGENERIC_SLOTS) and -1 or (slot - NUM_BANKGENERIC_SLOTS) + if bagID > -1 then + B:Layout(true) + else + this:UpdateBagSlots(-1) + end end end @@ -841,39 +873,41 @@ function B:GetGraysValue() end function B:VendorGrays(delete) - if not MerchantFrame or not MerchantFrame:IsShown() and not delete then + if B.SellFrame:IsShown() then return end + if (not MerchantFrame or not MerchantFrame:IsShown()) and not delete then E:Print(L["You must be at a vendor."]) return end - local goldGained, itemLink, itype, rarity, stackCount, stackPrice, _ = 0 + local itemLink, rarity, itype, itemPrice, _ for bag = 0, NUM_BAG_FRAMES, 1 do for slot = 1, GetContainerNumSlots(bag), 1 do itemLink = GetContainerItemLink(bag, slot) if itemLink then _, _, rarity, _, _, itype = GetItemInfo(match(itemLink, "item:(%d+)")) - stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1 + itemPrice = LIP:GetSellValue(itemLink) or 0 - if (rarity and rarity == 0) and (itype and itype ~= "Quest") then - if delete then - PickupContainerItem(bag, slot) - DeleteCursorItem() - else - stackPrice = (LIP:GetSellValue(itemLink) or 0) * stackCount - goldGained = goldGained + stackPrice - if E.db.general.vendorGraysDetails and itemLink then - E:Print(format("%s|cFF00DDDDx%d|r %s", itemLink, stackCount, B:FormatMoney(stackPrice))) - end - UseContainerItem(bag, slot) - end + if (rarity and rarity == 0) and (itype and itype ~= "Quest") and (itemPrice and itemPrice > 0) then + tinsert(B.SellFrame.Info.itemList, {bag, slot, itemLink, itemPrice}) end end end end - if goldGained > 0 then - E:Print(format(L["Vendored gray items for: %s"], B:FormatMoney(goldGained))) - end + if not B.SellFrame.Info.itemList then return end + if tmaxn(B.SellFrame.Info.itemList) < 1 then return end + --Resetting stuff + B.SellFrame.Info.delete = delete or false + B.SellFrame.Info.ProgressTimer = 0 + B.SellFrame.Info.SellInterval = E.db.bags.vendorGrays.interval + B.SellFrame.Info.ProgressMax = tmaxn(B.SellFrame.Info.itemList) + B.SellFrame.Info.goldGained = 0 + B.SellFrame.Info.itemsSold = 0 + B.SellFrame.statusbar:SetValue(0) + B.SellFrame.statusbar:SetMinMaxValues(0, B.SellFrame.Info.ProgressMax) + B.SellFrame.statusbar.ValueText:SetText("0 / "..B.SellFrame.Info.ProgressMax) + --Time to sell + B.SellFrame:Show() end function B:VendorGrayCheck() @@ -897,13 +931,12 @@ function B:ContructContainerFrame(name, isBank) f.UpdateAllSlots = B.UpdateAllSlots f.UpdateBagSlots = B.UpdateBagSlots f.UpdateCooldowns = B.UpdateCooldowns - f:RegisterEvent("ITEM_LOCK_CHANGED") - f:RegisterEvent("ITEM_UNLOCKED") - f:RegisterEvent("BAG_UPDATE_COOLDOWN") - f:RegisterEvent("BAG_UPDATE") + f:RegisterEvent("BAG_UPDATE") -- Has to be on both frames + f:RegisterEvent("BAG_UPDATE_COOLDOWN") -- Has to be on both frames + f.events = isBank and {"PLAYERBANKSLOTS_CHANGED"} or {"ITEM_LOCK_CHANGED", "ITEM_UNLOCKED"} - if isBank then - f:RegisterEvent("PLAYERBANKSLOTS_CHANGED") + for _, event in pairs(f.events) do + f:RegisterEvent(event) end f:SetScript("OnEvent", B.OnEvent) @@ -1423,6 +1456,87 @@ function B:PostBagMove() end end +function B:MERCHANT_CLOSED() + B.SellFrame:Hide() + twipe(B.SellFrame.Info.itemList) + B.SellFrame.Info.delete = false + B.SellFrame.Info.ProgressTimer = 0 + B.SellFrame.Info.SellInterval = E.db.bags.vendorGrays.interval + B.SellFrame.Info.ProgressMax = 0 + B.SellFrame.Info.goldGained = 0 + B.SellFrame.Info.itemsSold = 0 +end + function B:ProgressQuickVendor() + local item = B.SellFrame.Info.itemList[1] + if not item then return nil, true end --No more to sell + local bag, slot, itemLink, itemPrice = unpack(item) + + local stackPrice + local stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1 + if B.SellFrame.Info.delete then + PickupContainerItem(bag, slot) + DeleteCursorItem() + else + stackPrice = (itemPrice or 0) * stackCount + if E.db.bags.vendorGrays.details and itemLink then + E:Print(format("%s|cFF00DDDDx%d|r %s", itemLink, stackCount, B:FormatMoney(stackPrice))) + end + UseContainerItem(bag, slot) + end + tremove(B.SellFrame.Info.itemList, 1) + return stackPrice +end + function B:VendorGreys_OnUpdate() + B.SellFrame.Info.ProgressTimer = B.SellFrame.Info.ProgressTimer - arg1 + if B.SellFrame.Info.ProgressTimer > 0 then return end + B.SellFrame.Info.ProgressTimer = B.SellFrame.Info.SellInterval + local goldGained, lastItem = B:ProgressQuickVendor(); + if goldGained then + B.SellFrame.Info.goldGained = B.SellFrame.Info.goldGained + goldGained + B.SellFrame.Info.itemsSold = B.SellFrame.Info.itemsSold + 1 + B.SellFrame.statusbar:SetValue(B.SellFrame.Info.itemsSold) + local timeLeft = (B.SellFrame.Info.ProgressMax - B.SellFrame.Info.itemsSold)*B.SellFrame.Info.SellInterval + B.SellFrame.statusbar.ValueText:SetText(B.SellFrame.Info.itemsSold.." / "..B.SellFrame.Info.ProgressMax.." ( "..timeLeft.."s )") + elseif lastItem then + B.SellFrame:Hide() + if B.SellFrame.Info.goldGained > 0 then + E:Print(format(L["Vendored gray items for: %s"], B:FormatMoney(B.SellFrame.Info.goldGained))) + end + end +end + function B:CreateSellFrame() + B.SellFrame = CreateFrame("Frame", "ElvUIVendorGraysFrame", E.UIParent) + E:Size(B.SellFrame, 200,40) + E:Point(B.SellFrame, "CENTER", UIParent) + E:CreateBackdrop(B.SellFrame, "Transparent") + B.SellFrame.title = B.SellFrame:CreateFontString(nil, "OVERLAY") + E:FontTemplate(B.SellFrame.title, nil, 12, "OUTLINE") + E:Point(B.SellFrame.title, "TOP", B.SellFrame, "TOP", 0, -2) + B.SellFrame.title:SetText(L["Vendoring Grays"]) + B.SellFrame.statusbar = CreateFrame("StatusBar", "ElvUIVendorGraysFrameStatusbar", B.SellFrame) + E:Size(B.SellFrame.statusbar, 180, 16) + E:Point(B.SellFrame.statusbar, "BOTTOM", B.SellFrame, "BOTTOM", 0, 4) + B.SellFrame.statusbar:SetStatusBarTexture(E["media"].normTex) + E:CreateBackdrop(B.SellFrame.statusbar, "Transparent") + B.SellFrame.statusbar.ValueText = B.SellFrame.statusbar:CreateFontString(nil, "OVERLAY") + E:FontTemplate(B.SellFrame.statusbar.ValueText, nil, 12, "OUTLINE") + E:Point(B.SellFrame.statusbar.ValueText, "CENTER", B.SellFrame.statusbar) + B.SellFrame.statusbar.ValueText:SetText("0 / 0 ( 0s )") + + B.SellFrame.Info = { + delete = false, + ProgressTimer = 0, + SellInterval = E.db.bags.vendorGrays.interval, + ProgressMax = 0, + goldGained = 0, + itemsSold = 0, + itemList = {} + } + B.SellFrame:SetScript("OnUpdate", B.VendorGreys_OnUpdate) + B.SellFrame:Hide() +end + + function B:Initialize() self:LoadBagBar() @@ -1432,6 +1546,11 @@ function B:Initialize() E:Height(BagFrameHolder, 22) BagFrameHolder:SetFrameLevel(BagFrameHolder:GetFrameLevel() + 400) + --Creating vendor grays frame + B:CreateSellFrame() + + self:RegisterEvent("MERCHANT_CLOSED") + if not E.private.bags.enable then --Set a different default anchor E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2) diff --git a/ElvUI/Modules/Bags/Sort.lua b/ElvUI/Modules/Bags/Sort.lua index b2d338e..eb2bd3b 100644 --- a/ElvUI/Modules/Bags/Sort.lua +++ b/ElvUI/Modules/Bags/Sort.lua @@ -643,12 +643,12 @@ local function RegisterUpdateDelayed() bagFrame:UpdateAllSlots() bagFrame.registerUpdate = nil -- call update and re-register events, keep this after UpdateAllSlots shouldUpdateFade = true -- we should refresh the bag search after sorting - bagFrame:RegisterEvent("ITEM_LOCK_CHANGED") - bagFrame:RegisterEvent("ITEM_UNLOCKED") - bagFrame:RegisterEvent("BAG_UPDATE_COOLDOWN") + bagFrame:RegisterEvent("BAG_UPDATE") - if bagFrame.isBank then - bagFrame:RegisterEvent("PLAYERBANKSLOTS_CHANGED") + bagFrame:RegisterEvent("BAG_UPDATE_COOLDOWN") + + for _, event in pairs(bagFrame.events) do + bagFrame:RegisterEvent(event) end end end diff --git a/ElvUI/Modules/Misc/Misc.lua b/ElvUI/Modules/Misc/Misc.lua index 7737041..fb8723c 100644 --- a/ElvUI/Modules/Misc/Misc.lua +++ b/ElvUI/Modules/Misc/Misc.lua @@ -75,7 +75,7 @@ function M:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, _, sourceName, _, _, destNam end function M:MERCHANT_SHOW() - if E.db.general.vendorGrays then + if E.db.bags.vendorGrays.enable then E:GetModule("Bags"):VendorGrays(nil, true) end @@ -173,6 +173,9 @@ function M:ForceCVars() end function M:Initialize() + --DB conversion + if E.db.general.vendorGrays then E.db.bags.vendorGrays.enable = E.db.general.vendorGrays end + self:LoadRaidMarker() self:LoadLoot() self:LoadLootRoll() diff --git a/ElvUI/Modules/Skins/Blizzard/Misc.lua b/ElvUI/Modules/Skins/Blizzard/Misc.lua index 4c44a89..b2d50f4 100644 --- a/ElvUI/Modules/Skins/Blizzard/Misc.lua +++ b/ElvUI/Modules/Skins/Blizzard/Misc.lua @@ -238,7 +238,9 @@ local function LoadSkin() S:HandleButton(CoinPickupCancelButton) -- Stack Split Frame + E:SetTemplate(StackSplitFrame, "Transparent") StackSplitFrame:GetRegions():Hide() + StackSplitFrame:SetFrameStrata("DIALOG") StackSplitFrame.bg1 = CreateFrame("Frame", nil, StackSplitFrame) E:SetTemplate(StackSplitFrame.bg1, "Transparent") diff --git a/ElvUI/Settings/Profile.lua b/ElvUI/Settings/Profile.lua index 780b93a..fc93205 100644 --- a/ElvUI/Settings/Profile.lua +++ b/ElvUI/Settings/Profile.lua @@ -9,7 +9,6 @@ P["general"] = { ["loginmessage"] = true, ["autoRepair"] = "NONE", ["autoRoll"] = false, - ["vendorGrays"] = false, ["autoAcceptInvite"] = false, ["bottomPanel"] = true, ["hideErrorFrame"] = true, @@ -564,9 +563,31 @@ P["bags"] = { ["countFontSize"] = 10, ["countFontOutline"] = "MONOCHROMEOUTLINE", ["countFontColor"] = {r = 1, g = 1, b = 1}, + ["reverseSlots"] = false, ["clearSearchOnClose"] = false, ["disableBagSort"] = false, ["disableBankSort"] = false, + ["vendorGrays"] = { + ["enable"] = false, + ["interval"] = 0.2, + ["details"] = false + }, + ["split"] = { + ["bagSpacing"] = 5, + ["player"] = false, + ["bank"] = false, + ["bag1"] = false, + ["bag2"] = false, + ["bag3"] = false, + ["bag4"] = false, + ["bag5"] = false, + ["bag6"] = false, + ["bag7"] = false, + ["bag8"] = false, + ["bag9"] = false, + ["bag10"] = false, + ["bag11"] = false, + }, ["bagBar"] = { ["growthDirection"] = "VERTICAL", ["sortDirection"] = "ASCENDING", diff --git a/ElvUI_Config/Bags.lua b/ElvUI_Config/Bags.lua index ecaf16f..cfce306 100644 --- a/ElvUI_Config/Bags.lua +++ b/ElvUI_Config/Bags.lua @@ -60,20 +60,26 @@ E.Options.args.bags = { name = L["Clear Search On Close"], set = function(info, value) E.db.bags[ info[getn(info)] ] = value end }, - disableBagSort = { + reverseSlots = { order = 3, type = "toggle", + name = L["Reverse Bag Slots"], + set = function(info, value) E.db.bags[info[getn(info)]] = value B:UpdateAll() end, + }, + disableBagSort = { + order = 4, + type = "toggle", name = L["Disable Bag Sort"], set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(false) end }, disableBankSort = { - order = 4, + order = 5, type = "toggle", name = L["Disable Bank Sort"], set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(true) end }, countGroup = { - order = 5, + order = 6, type = "group", name = L["Item Count Font"], guiInline = true, @@ -123,7 +129,7 @@ E.Options.args.bags = { } }, itemLevelGroup = { - order = 6, + order = 7, type = "group", name = L["Item Level"], guiInline = true, @@ -307,9 +313,152 @@ E.Options.args.bags = { } } }, - bagSortingGroup = { + split = { order = 6, type = "group", + name = L["Split"], + get = function(info) return E.db.bags.split[ info[getn(info)] ] end, + set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:UpdateAll() end, + disabled = function() return not E.bags end, + args = { + header = { + order = 1, + type = "header", + name = L["Split"] + }, + bagSpacing = { + order = 2, + type = "range", + name = L["Bag Spacing"], + min = 0, max = 20, step = 1 + }, + player = { + order = 3, + type = "toggle", + set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout() end, + name = L["Bag"] + }, + bank = { + order = 4, + type = "toggle", + set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout(true) end, + name = L["Bank"] + }, + splitbags = { + order = 5, + type = "group", + name = L["Player"], + get = function(info) return E.db.bags.split[ info[getn(info)] ] end, + set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout() end, + disabled = function() return not E.db.bags.split.player end, + guiInline = true, + args = { + bag1 = { + order = 2, + type = "toggle", + name = L["Bag 1"] + }, + bag2 = { + order = 3, + type = "toggle", + name = L["Bag 2"] + }, + bag3 = { + order = 4, + type = "toggle", + name = L["Bag 3"] + }, + bag4 = { + order = 5, + type = "toggle", + name = L["Bag 4"] + } + } + }, + splitbank = { + order = 6, + type = "group", + name = L["Bank"], + get = function(info) return E.db.bags.split[ info[getn(info)] ] end, + set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout(true) end, + disabled = function() return not E.db.bags.split.bank end, + guiInline = true, + args = { + bag5 = { + order = 2, + type = "toggle", + name = L["Bank 1"] + }, + bag6 = { + order = 3, + type = "toggle", + name = L["Bank 2"] + }, + bag7 = { + order = 4, + type = "toggle", + name = L["Bank 3"] + }, + bag8 = { + order = 5, + type = "toggle", + name = L["Bank 4"] + }, + bag9 = { + order = 6, + type = "toggle", + name = L["Bank 5"] + }, + bag10 = { + order = 7, + type = "toggle", + name = L["Bank 6"] + }, + bag11 = { + order = 8, + type = "toggle", + name = L["Bank 7"] + } + } + } + } + }, + vendorGrays = { + order = 7, + type = "group", + name = L["Vendor Grays"], + get = function(info) return E.db.bags.vendorGrays[ info[getn(info)] ] end, + set = function(info, value) E.db.bags.vendorGrays[ info[getn(info)] ] = value end, + args = { + header = { + order = 1, + type = "header", + name = L["Vendor Grays"] + }, + enable = { + order = 2, + type = "toggle", + name = L["Enable"], + desc = L["Automatically vendor gray items when visiting a vendor."] + }, + interval = { + order = 3, + type = "range", + name = L["Sell Interval"], + desc = L["Will attempt to sell another item in set interval after previous one was sold."], + min = 0.1, max = 1, step = 0.1 + }, + details = { + order = 4, + type = "toggle", + name = L["Vendor Gray Detailed Report"], + desc = L["Displays a detailed report of every item sold when enabled."] + } + } + }, + bagSortingGroup = { + order = 8, + type = "group", name = L["Bag Sorting"], disabled = function() return not E.bags end, args = { @@ -347,7 +496,7 @@ E.Options.args.bags = { desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."], get = function(info) return "" end, set = function(info, value) - if(value == "" or gsub(value, "%s+", "") == "") then return end + if value == "" or gsub(value, "%s+", "") == "" then return end local itemID = match(value, "item:(%d+)") E.db.bags.ignoredItems[(itemID or value)] = value @@ -403,13 +552,18 @@ E.Options.args.bags = { } }, search_syntax = { - order = 7, + order = 9, type = "group", name = L["Search Syntax"], disabled = function() return not E.bags end, args = { - text = { + header = { order = 1, + type = "header", + name = L["Search Syntax"] + }, + text = { + order = 2, type = "input", multiline = 30, width = "full", diff --git a/ElvUI_Config/General.lua b/ElvUI_Config/General.lua index 65edf92..4e99006 100644 --- a/ElvUI_Config/General.lua +++ b/ElvUI_Config/General.lua @@ -81,21 +81,15 @@ E.Options.args.general = { name = L["Accept Invites"], desc = L["Automatically accept invites from guild/friends."] }, - vendorGrays = { - order = 6, - type = "toggle", - name = L["Vendor Grays"], - desc = L["Automatically vendor gray items when visiting a vendor."] - }, autoRoll = { - order = 7, + order = 6, type = "toggle", name = L["Auto Greed/DE"], desc = L["Automatically select greed or disenchant (when available) on green quality items. This will only work if you are the max level."], disabled = function() return not E.private.general.lootRoll; end }, loot = { - order = 8, + order = 7, type = "toggle", name = L["Loot"], desc = L["Enable/Disable the loot frame."], @@ -103,7 +97,7 @@ E.Options.args.general = { set = function(info, value) E.private.general.loot = value; E:StaticPopup_Show("PRIVATE_RL"); end }, lootRoll = { - order = 9, + order = 8, type = "toggle", name = L["Loot Roll"], desc = L["Enable/Disable the loot roll frame."], @@ -111,7 +105,7 @@ E.Options.args.general = { set = function(info, value) E.private.general.lootRoll = value; E:StaticPopup_Show("PRIVATE_RL"); end }, lootUnderMouse = { - order = 10, + order = 9, type = "toggle", name = L["Loot Under Mouse"], desc = L["Enable/Disable loot frame under the mouse cursor."], @@ -120,7 +114,7 @@ E.Options.args.general = { disabled = function() return not E.private.general.loot; end }, eyefinity = { - order = 11, + order = 10, name = L["Multi-Monitor Support"], desc = L["Attempt to support eyefinity/nvidia surround."], type = "toggle", @@ -128,13 +122,13 @@ E.Options.args.general = { set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL"); end }, hideErrorFrame = { - order = 12, + order = 11, type = "toggle", name = L["Hide Error Text"], desc = L["Hides the red error text at the top of the screen while in combat."] }, bottomPanel = { - order = 13, + order = 12, type = "toggle", name = L["Bottom Panel"], desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."], @@ -142,7 +136,7 @@ E.Options.args.general = { set = function(info, value) E.db.general.bottomPanel = value; E:GetModule("Layout"):BottomPanelVisibility(); end }, topPanel = { - order = 14, + order = 13, type = "toggle", name = L["Top Panel"], desc = L["Display a panel across the top of the screen. This is for cosmetic only."], @@ -150,7 +144,7 @@ E.Options.args.general = { set = function(info, value) E.db.general.topPanel = value; E:GetModule("Layout"):TopPanelVisibility(); end }, afk = { - order = 15, + order = 14, type = "toggle", name = L["AFK Mode"], desc = L["When you go AFK display the AFK screen."], @@ -158,13 +152,13 @@ E.Options.args.general = { set = function(info, value) E.db.general.afk = value; E:GetModule("AFK"):Toggle(); end }, enhancedPvpMessages = { - order = 16, + order = 15, type = "toggle", name = L["Enhanced PVP Messages"], desc = L["Display battleground messages in the middle of the screen."], }, raidUtility = { - order = 17, + order = 16, type = "toggle", name = RAID_CONTROL, desc = L["Enables the ElvUI Raid Control panel."], @@ -172,7 +166,7 @@ E.Options.args.general = { set = function(info, value) E.private.general.raidUtility = value; E:StaticPopup_Show("PRIVATE_RL") end }, autoScale = { - order = 18, + order = 17, name = L["Auto Scale"], desc = L["Automatically scale the User Interface based on your screen resolution"], type = "toggle", @@ -180,7 +174,7 @@ E.Options.args.general = { set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL") end }, minUiScale = { - order = 19, + order = 18, type = "range", name = L["Lowest Allowed UI Scale"], min = 0.32, max = 0.64, step = 0.01, @@ -188,7 +182,7 @@ E.Options.args.general = { set = function(info, value) E.global.general.minUiScale = value; E:StaticPopup_Show("GLOBAL_RL"); end }, numberPrefixStyle = { - order = 20, + order = 19, type = "select", name = L["Number Prefix"], get = function(info) return E.db.general.numberPrefixStyle; end, @@ -202,7 +196,7 @@ E.Options.args.general = { } }, decimalLength = { - order = 21, + order = 20, type = "range", name = L["Decimal Length"], desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."],