mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update
This commit is contained in:
+1
-1
@@ -141,7 +141,7 @@ function E:ColorizedName(name, arg2)
|
||||
end
|
||||
|
||||
function E:Print(msg)
|
||||
print(self:ColorizedName("ElvUI", true), msg)
|
||||
(_G[self.db.general.messageRedirect] or DEFAULT_CHAT_FRAME):AddMessage(strjoin("", self:ColorizedName("ElvUI", true), msg)) -- I put DEFAULT_CHAT_FRAME as a fail safe.
|
||||
end
|
||||
|
||||
E.PriestColors = {
|
||||
|
||||
@@ -56,7 +56,7 @@ B.ProfessionColors = {
|
||||
[1] = {225/255, 175/255, 105/255}, -- Quiver
|
||||
[2] = {225/255, 175/255, 105/255}, -- Ammo Pouch
|
||||
[4] = {225/255, 175/255, 105/255}, -- Soul Bag
|
||||
[8] = {18/255, 181/255, 32/255}, -- Herbs
|
||||
[8] = {18/255, 181/255, 32/255}, -- Herbalism
|
||||
[16] = {160/255, 3/255, 168/255}, -- Enchanting
|
||||
}
|
||||
|
||||
@@ -246,6 +246,15 @@ function B:UpdateBagTypes(isBank)
|
||||
end
|
||||
end
|
||||
|
||||
function B:UpdateAllBagSlots()
|
||||
if E.private.bags.enable ~= true then return end
|
||||
|
||||
for _, bagFrame in pairs(self.BagFrames) do
|
||||
if bagFrame.UpdateAllSlots then
|
||||
bagFrame:UpdateAllSlots()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function B:UpdateSlot(bagID, slotID)
|
||||
if (self.Bags[bagID] and self.Bags[bagID].numSlots ~= GetContainerNumSlots(bagID)) or not self.Bags[bagID] or not self.Bags[bagID][slotID] then return end
|
||||
@@ -277,7 +286,11 @@ function B:UpdateSlot(bagID, slotID)
|
||||
if iLvl and B.db.itemLevel and (itemEquipLoc ~= nil and itemEquipLoc ~= "" and itemEquipLoc ~= "INVTYPE_AMMO" and itemEquipLoc ~= "INVTYPE_BAG" and itemEquipLoc ~= "INVTYPE_QUIVER" and itemEquipLoc ~= "INVTYPE_TABARD") and (slot.rarity and slot.rarity > 1) then
|
||||
if iLvl >= E.db.bags.itemLevelThreshold then
|
||||
slot.itemLevel:SetText(iLvl)
|
||||
slot.itemLevel:SetTextColor(r, g, b)
|
||||
if B.db.itemLevelCustomColorEnable then
|
||||
slot.itemLevel:SetTextColor(B.db.itemLevelCustomColor.r, B.db.itemLevelCustomColor.g, B.db.itemLevelCustomColor.b)
|
||||
else
|
||||
slot.itemLevel:SetTextColor(r, g, b)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -914,9 +927,11 @@ function B:VendorGrayCheck()
|
||||
end
|
||||
|
||||
function B:ContructContainerFrame(name, isBank)
|
||||
local strata = E.db.bags.strata or "HIGH"
|
||||
|
||||
local f = CreateFrame("Button", name, E.UIParent)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
f:SetFrameStrata("DIALOG")
|
||||
f:SetFrameStrata(strata)
|
||||
f.UpdateSlot = B.UpdateSlot
|
||||
f.UpdateAllSlots = B.UpdateAllSlots
|
||||
f.UpdateBagSlots = B.UpdateBagSlots
|
||||
@@ -962,7 +977,7 @@ function B:ContructContainerFrame(name, isBank)
|
||||
f:SetScript("OnLeave", function() GameTooltip:Hide() end)
|
||||
|
||||
f.closeButton = CreateFrame("Button", name.."CloseButton", f, "UIPanelCloseButton")
|
||||
E:Point(f.closeButton, "TOPRIGHT", -4, -4)
|
||||
E:Point(f.closeButton, "TOPRIGHT", 2, 2)
|
||||
|
||||
E:GetModule("Skins"):HandleCloseButton(f.closeButton)
|
||||
|
||||
@@ -1531,6 +1546,17 @@ end
|
||||
B.SellFrame:Hide()
|
||||
end
|
||||
|
||||
B.BagIndice = {
|
||||
quiver = 1,
|
||||
ammoPouch = 2,
|
||||
soulBag = 4,
|
||||
herbs = 8,
|
||||
enchanting = 16,
|
||||
}
|
||||
|
||||
function B:UpdateBagColors(table, indice, r, g, b)
|
||||
self[table][B.BagIndice[indice]] = {r, g, b}
|
||||
end
|
||||
|
||||
function B:Initialize()
|
||||
self:LoadBagBar()
|
||||
@@ -1559,6 +1585,14 @@ function B:Initialize()
|
||||
self.db = E.db.bags
|
||||
self.BagFrames = {}
|
||||
|
||||
self.ProfessionColors = {
|
||||
[1] = {self.db.colors.profession.quiver.r, self.db.colors.profession.quiver.g, self.db.colors.profession.quiver.b},
|
||||
[2] = {self.db.colors.profession.ammoPouch.r, self.db.colors.profession.ammoPouch.g, self.db.colors.profession.ammoPouch.b},
|
||||
[4] = {self.db.colors.profession.soulBag.r, self.db.colors.profession.soulBag.g, self.db.colors.profession.soulBag.b},
|
||||
[8] = {self.db.colors.profession.herbs.r, self.db.colors.profession.herbs.g, self.db.colors.profession.herbs.b},
|
||||
[16] = {self.db.colors.profession.enchanting.r, self.db.colors.profession.enchanting.g, self.db.colors.profession.enchanting.b},
|
||||
}
|
||||
|
||||
--Bag Mover: Set default anchor point and create mover
|
||||
E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 22 + E.Border*4 - E.Spacing*2)
|
||||
E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover (Grow Up)"], nil, nil, B.PostBagMove)
|
||||
|
||||
@@ -89,7 +89,7 @@ local function LoadSkin()
|
||||
|
||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
||||
|
||||
S:HandleCloseButton(CraftFrameCloseButton)
|
||||
S:HandleCloseButton(CraftFrameCloseButton, CraftFrame.backdrop)
|
||||
|
||||
E:StripTextures(CraftExpandButtonFrame)
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ local function LoadSkin()
|
||||
|
||||
TradeSkillRequirementLabel:SetTextColor(1, 0.80, 0.10)
|
||||
|
||||
S:HandleCloseButton(TradeSkillFrameCloseButton)
|
||||
S:HandleCloseButton(TradeSkillFrameCloseButton, TradeSkillFrame.backdrop)
|
||||
|
||||
E:StripTextures(TradeSkillExpandButtonFrame)
|
||||
|
||||
|
||||
+96
-54
@@ -5,6 +5,7 @@ P.farmSize = 340
|
||||
|
||||
--Core
|
||||
P["general"] = {
|
||||
["messageRedirect"] = DEFAULT_CHAT_FRAME:GetName(),
|
||||
["stickyFrames"] = true,
|
||||
["loginmessage"] = true,
|
||||
["autoRepair"] = "NONE",
|
||||
@@ -96,6 +97,101 @@ P["databars"] = {
|
||||
},
|
||||
}
|
||||
|
||||
--Bags
|
||||
P["bags"] = {
|
||||
["sortInverted"] = true,
|
||||
["bagSize"] = 34,
|
||||
["bankSize"] = 34,
|
||||
["bagWidth"] = 406,
|
||||
["bankWidth"] = 406,
|
||||
["moneyFormat"] = "SMART",
|
||||
["moneyCoins"] = true,
|
||||
["ignoredItems"] = {},
|
||||
["itemLevel"] = true,
|
||||
["itemLevelThreshold"] = 1,
|
||||
["itemLevelFont"] = "Homespun",
|
||||
["itemLevelFontSize"] = 10,
|
||||
["itemLevelFontOutline"] = "MONOCHROMEOUTLINE",
|
||||
["itemLevelCustomColorEnable"] = false,
|
||||
["itemLevelCustomColor"] = {r = 1, g = 1, b = 1},
|
||||
["countFont"] = "Homespun",
|
||||
["countFontSize"] = 10,
|
||||
["countFontOutline"] = "MONOCHROMEOUTLINE",
|
||||
["countFontColor"] = {r = 1, g = 1, b = 1},
|
||||
["reverseSlots"] = false,
|
||||
["clearSearchOnClose"] = false,
|
||||
["disableBagSort"] = false,
|
||||
["disableBankSort"] = false,
|
||||
["strata"] = "DIALOG",
|
||||
["colors"] = {
|
||||
["profession"] = {
|
||||
["quiver"] = {r = 1, g = 0.56, b = 0.73},
|
||||
["ammoPouch"] = {r = 1, g = 0.56, b = 0.73},
|
||||
["soulBag"] = {r = 0.47, g = 0.26, b = 1},
|
||||
["leatherworking"] = {r = 0.88, g = 0.73, b = 0.29},
|
||||
["herbs"] = {r = 0.07, g = 0.71, b = 0.13},
|
||||
["enchanting"] = {r = 0.76, g = 0.02, b = 0.8},
|
||||
["engineering"] = {r = 0.91, g = 0.46, b = 0.18},
|
||||
["gems"] = {r = 0.03, g = 0.71, b = 0.81},
|
||||
["mining"] = {r = 0.54, g = 0.40, b = 0.04}
|
||||
}
|
||||
},
|
||||
["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,
|
||||
},
|
||||
["cooldown"] = {
|
||||
["threshold"] = 4,
|
||||
["override"] = false,
|
||||
["reverse"] = false,
|
||||
["expiringColor"] = {r = 1, g = 0, b = 0},
|
||||
["secondsColor"] = {r = 1, g = 1, b = 1},
|
||||
["minutesColor"] = {r = 1, g = 1, b = 1},
|
||||
["hoursColor"] = {r = 1, g = 1, b = 1},
|
||||
["daysColor"] = {r = 1, g = 1, b = 1},
|
||||
|
||||
["checkSeconds"] = false,
|
||||
["hhmmColor"] = {r = 1, g = 1, b = 1},
|
||||
["mmssColor"] = {r = 1, g = 1, b = 1},
|
||||
["hhmmThreshold"] = -1,
|
||||
["mmssThreshold"] = -1,
|
||||
|
||||
["fonts"] = {
|
||||
["enable"] = false,
|
||||
["font"] = "PT Sans Narrow",
|
||||
["fontOutline"] = "OUTLINE",
|
||||
["fontSize"] = 18
|
||||
}
|
||||
},
|
||||
["bagBar"] = {
|
||||
["growthDirection"] = "VERTICAL",
|
||||
["sortDirection"] = "ASCENDING",
|
||||
["size"] = 30,
|
||||
["spacing"] = 4,
|
||||
["backdropSpacing"] = 4,
|
||||
["showBackdrop"] = false,
|
||||
["mouseover"] = false,
|
||||
["visibility"] = "",
|
||||
}
|
||||
}
|
||||
|
||||
P["nameplates"] = {
|
||||
["statusbar"] = "ElvUI Norm",
|
||||
["font"] = "PT Sans Narrow",
|
||||
@@ -545,60 +641,6 @@ P["tooltip"] = {
|
||||
}
|
||||
}
|
||||
|
||||
P["bags"] = {
|
||||
["sortInverted"] = true,
|
||||
["bagSize"] = 34,
|
||||
["bankSize"] = 34,
|
||||
["bagWidth"] = 406,
|
||||
["bankWidth"] = 406,
|
||||
["moneyFormat"] = "SMART",
|
||||
["moneyCoins"] = true,
|
||||
["ignoredItems"] = {},
|
||||
["itemLevel"] = true,
|
||||
["itemLevelThreshold"] = 1,
|
||||
["itemLevelFont"] = "Homespun",
|
||||
["itemLevelFontSize"] = 10,
|
||||
["itemLevelFontOutline"] = "MONOCHROMEOUTLINE",
|
||||
["countFont"] = "Homespun",
|
||||
["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",
|
||||
["size"] = 30,
|
||||
["spacing"] = 4,
|
||||
["backdropSpacing"] = 4,
|
||||
["showBackdrop"] = false,
|
||||
["mouseover"] = false
|
||||
}
|
||||
}
|
||||
|
||||
--UnitFrame
|
||||
P["unitframe"] = {
|
||||
["smoothbars"] = false,
|
||||
|
||||
+111
-19
@@ -35,12 +35,26 @@ E.Options.args.bags = {
|
||||
disabled = function() return not E.bags end,
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
order = 1,
|
||||
type = "header",
|
||||
name = GENERAL
|
||||
},
|
||||
strata = {
|
||||
order = 2,
|
||||
type = "select",
|
||||
name = L["Frame Strata"],
|
||||
set = function(info, value) E.db.bags[info[getn(info)]] = value; E:StaticPopup_Show("PRIVATE_RL") end,
|
||||
values = {
|
||||
["BACKGROUND"] = "BACKGROUND",
|
||||
["LOW"] = "LOW",
|
||||
["MEDIUM"] = "MEDIUM",
|
||||
["HIGH"] = "HIGH",
|
||||
["DIALOG"] = "DIALOG",
|
||||
["TOOLTIP"] = "TOOLTIP"
|
||||
}
|
||||
},
|
||||
moneyFormat = {
|
||||
order = 1,
|
||||
order = 3,
|
||||
type = "select",
|
||||
name = L["Money Format"],
|
||||
desc = L["The display format of the money text that is shown at the top of the main bag."],
|
||||
@@ -55,31 +69,31 @@ E.Options.args.bags = {
|
||||
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText() end
|
||||
},
|
||||
clearSearchOnClose = {
|
||||
order = 2,
|
||||
order = 4,
|
||||
type = "toggle",
|
||||
name = L["Clear Search On Close"],
|
||||
set = function(info, value) E.db.bags[ info[getn(info)] ] = value end
|
||||
},
|
||||
reverseSlots = {
|
||||
order = 3,
|
||||
order = 5,
|
||||
type = "toggle",
|
||||
name = L["Reverse Bag Slots"],
|
||||
set = function(info, value) E.db.bags[info[getn(info)]] = value B:UpdateAll() end,
|
||||
},
|
||||
disableBagSort = {
|
||||
order = 4,
|
||||
order = 6,
|
||||
type = "toggle",
|
||||
name = L["Disable Bag Sort"],
|
||||
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(false) end
|
||||
},
|
||||
disableBankSort = {
|
||||
order = 5,
|
||||
order = 7,
|
||||
type = "toggle",
|
||||
name = L["Disable Bank Sort"],
|
||||
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(true) end
|
||||
},
|
||||
countGroup = {
|
||||
order = 6,
|
||||
order = 8,
|
||||
type = "group",
|
||||
name = L["Item Count Font"],
|
||||
guiInline = true,
|
||||
@@ -141,8 +155,30 @@ E.Options.args.bags = {
|
||||
desc = L["Displays item level on equippable items."],
|
||||
set = function(info, value) E.db.bags.itemLevel = value; B:UpdateItemLevelDisplay() end
|
||||
},
|
||||
itemLevelThreshold = {
|
||||
itemLevelCustomColorEnable = {
|
||||
order = 2,
|
||||
type = "toggle",
|
||||
name = L["Enable Custom Color"],
|
||||
set = function(info, value) E.db.bags.itemLevelCustomColorEnable = value B:UpdateItemLevelDisplay() end
|
||||
},
|
||||
itemLevelCustomColor = {
|
||||
order = 3,
|
||||
type = "color",
|
||||
name = L["Custom Color"],
|
||||
disabled = function() return not E.db.bags.itemLevelCustomColorEnable end,
|
||||
get = function(info)
|
||||
local t = E.db.bags.itemLevelCustomColor
|
||||
local d = P.bags.itemLevelCustomColor
|
||||
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
|
||||
end,
|
||||
set = function(info, r, g, b)
|
||||
local t = E.db.bags.itemLevelCustomColor
|
||||
t.r, t.g, t.b = r, g, b
|
||||
B:UpdateItemLevelDisplay()
|
||||
end
|
||||
},
|
||||
itemLevelThreshold = {
|
||||
order = 4,
|
||||
name = L["Item Level Threshold"],
|
||||
desc = L["The minimum item level required for it to be shown."],
|
||||
type = "range",
|
||||
@@ -151,12 +187,12 @@ E.Options.args.bags = {
|
||||
set = function(info, value) E.db.bags.itemLevelThreshold = value; B:UpdateItemLevelDisplay() end
|
||||
},
|
||||
spacer = {
|
||||
order = 3,
|
||||
order = 5,
|
||||
type = "description",
|
||||
name = " "
|
||||
},
|
||||
itemLevelFont = {
|
||||
order = 4,
|
||||
order = 6,
|
||||
type = "select",
|
||||
dialogControl = "LSM30_Font",
|
||||
name = L["Font"],
|
||||
@@ -165,7 +201,7 @@ E.Options.args.bags = {
|
||||
set = function(info, value) E.db.bags.itemLevelFont = value; B:UpdateItemLevelDisplay() end
|
||||
},
|
||||
itemLevelFontSize = {
|
||||
order = 5,
|
||||
order = 7,
|
||||
type = "range",
|
||||
name = FONT_SIZE,
|
||||
min = 6, max = 33, step = 1,
|
||||
@@ -173,7 +209,7 @@ E.Options.args.bags = {
|
||||
set = function(info, value) E.db.bags.itemLevelFontSize = value; B:UpdateItemLevelDisplay() end
|
||||
},
|
||||
itemLevelFontOutline = {
|
||||
order = 6,
|
||||
order = 8,
|
||||
type = "select",
|
||||
name = L["Font Outline"],
|
||||
disabled = function() return not E.db.bags.itemLevel end,
|
||||
@@ -239,9 +275,65 @@ E.Options.args.bags = {
|
||||
}
|
||||
}
|
||||
},
|
||||
bagBar = {
|
||||
colorGroup = {
|
||||
order = 5,
|
||||
type = "group",
|
||||
name = COLOR,
|
||||
args = {
|
||||
header = {
|
||||
order = 1,
|
||||
type = "header",
|
||||
name = COLOR
|
||||
},
|
||||
profession = {
|
||||
order = 2,
|
||||
type = "group",
|
||||
name = L["Profession Bags"],
|
||||
guiInline = true,
|
||||
get = function(info)
|
||||
local t = E.db.bags.colors.profession[ info[getn(info)] ]
|
||||
local d = P.bags.colors.profession[info[getn(info)]]
|
||||
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
|
||||
end,
|
||||
set = function(info, r, g, b)
|
||||
local t = E.db.bags.colors.profession[ info[getn(info)] ]
|
||||
t.r, t.g, t.b = r, g, b
|
||||
B:UpdateBagColors("ProfessionColors", info[getn(info)], r, g, b)
|
||||
B:UpdateAllBagSlots()
|
||||
end,
|
||||
args = {
|
||||
quiver = {
|
||||
order = 1,
|
||||
type = "color",
|
||||
name = L["Quiver"]
|
||||
},
|
||||
ammoPouch = {
|
||||
order = 2,
|
||||
type = "color",
|
||||
name = L["Ammo Pouch"]
|
||||
},
|
||||
soulBag = {
|
||||
order = 3,
|
||||
type = "color",
|
||||
name = L["Soul Bag"]
|
||||
},
|
||||
herbs = {
|
||||
order = 4,
|
||||
type = "color",
|
||||
name = L["Herbalism"]
|
||||
},
|
||||
enchanting = {
|
||||
order = 5,
|
||||
type = "color",
|
||||
name = L["Enchanting"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
bagBar = {
|
||||
order = 6,
|
||||
type = "group",
|
||||
name = L["Bag-Bar"],
|
||||
get = function(info) return E.db.bags.bagBar[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value; B:SizeAndPositionBagBar() end,
|
||||
@@ -314,7 +406,7 @@ E.Options.args.bags = {
|
||||
}
|
||||
},
|
||||
split = {
|
||||
order = 6,
|
||||
order = 7,
|
||||
type = "group",
|
||||
name = L["Split"],
|
||||
get = function(info) return E.db.bags.split[ info[getn(info)] ] end,
|
||||
@@ -424,7 +516,7 @@ E.Options.args.bags = {
|
||||
}
|
||||
},
|
||||
vendorGrays = {
|
||||
order = 7,
|
||||
order = 8,
|
||||
type = "group",
|
||||
name = L["Vendor Grays"],
|
||||
get = function(info) return E.db.bags.vendorGrays[ info[getn(info)] ] end,
|
||||
@@ -457,7 +549,7 @@ E.Options.args.bags = {
|
||||
}
|
||||
},
|
||||
bagSortingGroup = {
|
||||
order = 8,
|
||||
order = 9,
|
||||
type = "group",
|
||||
name = L["Bag Sorting"],
|
||||
disabled = function() return not E.bags end,
|
||||
@@ -538,7 +630,7 @@ E.Options.args.bags = {
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
},
|
||||
--[[ignoredEntriesGlobal = {
|
||||
ignoredEntriesGlobal = {
|
||||
order = 6,
|
||||
type = "multiselect",
|
||||
name = L["Ignored Items and Search Syntax (Global)"],
|
||||
@@ -548,11 +640,11 @@ E.Options.args.bags = {
|
||||
E.global.bags.ignoredItems[value] = nil
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
}--]]
|
||||
}
|
||||
}
|
||||
},
|
||||
search_syntax = {
|
||||
order = 9,
|
||||
order = 10,
|
||||
type = "group",
|
||||
name = L["Search Syntax"],
|
||||
disabled = function() return not E.bags end,
|
||||
|
||||
+88
-61
@@ -7,6 +7,17 @@ local getn = table.getn
|
||||
--WoW API / Variables
|
||||
local CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY = CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY
|
||||
|
||||
local function GetChatWindowInfo()
|
||||
local ChatTabInfo = {}
|
||||
for i = 1, FCF_GetNumActiveChatFrames() do
|
||||
if i ~= 2 then
|
||||
ChatTabInfo["ChatFrame"..i] = _G["ChatFrame"..i.."Tab"]:GetText()
|
||||
end
|
||||
end
|
||||
|
||||
return ChatTabInfo
|
||||
end
|
||||
|
||||
E.Options.args.general = {
|
||||
type = "group",
|
||||
name = GENERAL,
|
||||
@@ -51,6 +62,13 @@ E.Options.args.general = {
|
||||
get = function(info) return E.private.general.pixelPerfect; end,
|
||||
set = function(info, value) E.private.general.pixelPerfect = value; E:StaticPopup_Show("PRIVATE_RL"); end
|
||||
},
|
||||
messageRedirect = {
|
||||
order = 2,
|
||||
type = "select",
|
||||
name = L["Chat Output"],
|
||||
desc = L["This selects the Chat Frame to use as the output of ElvUI messages."],
|
||||
values = GetChatWindowInfo()
|
||||
},
|
||||
interruptAnnounce = {
|
||||
order = 3,
|
||||
type = "select",
|
||||
@@ -203,70 +221,11 @@ E.Options.args.general = {
|
||||
min = 0, max = 4, step = 1,
|
||||
get = function(info) return E.db.general.decimalLength end,
|
||||
set = function(info, value) E.db.general.decimalLength = value; E:StaticPopup_Show("GLOBAL_RL") end
|
||||
},
|
||||
classCacheHeader = {
|
||||
order = 51,
|
||||
type = "header",
|
||||
name = L["Class Cache"]
|
||||
},
|
||||
classCacheEnable = {
|
||||
order = 52,
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
desc = L["Enable class caching to colorize names in chat and nameplates."],
|
||||
get = function(info) return E.private.general.classCache end,
|
||||
set = function(info, value)
|
||||
E.private.general.classCache = value
|
||||
CC:ToggleModule()
|
||||
end
|
||||
},
|
||||
classCacheStoreInDB = {
|
||||
order = 53,
|
||||
type = "toggle",
|
||||
name = L["Store cache in DB"],
|
||||
desc = L["If cache stored in DB it will be available between game sessions but increase memory usage.\nIn other way it will be wiped on relog or UI reload."],
|
||||
get = function(info) return E.db.general.classCacheStoreInDB end,
|
||||
set = function(info, value)
|
||||
E.db.general.classCacheStoreInDB = value
|
||||
CC:SwitchCacheType()
|
||||
end,
|
||||
disabled = function() return not E.private.general.classCache end
|
||||
},
|
||||
classCacheRequestInfo = {
|
||||
order = 54,
|
||||
type = "toggle",
|
||||
name = L["Request info for class cache"],
|
||||
desc = L["Use LibWho to cache class info"],
|
||||
get = function(info) return E.db.general.classCacheRequestInfo end,
|
||||
set = function(info, value)
|
||||
E.db.general.classCacheRequestInfo = value
|
||||
end,
|
||||
disabled = function() return not E.private.general.classCache end
|
||||
},
|
||||
wipeClassCacheGlobal = {
|
||||
order = 55,
|
||||
type = "execute",
|
||||
name = L["Wipe DB Cache"],
|
||||
func = function()
|
||||
CC:WipeCache(true)
|
||||
GameTooltip:Hide()
|
||||
end,
|
||||
disabled = function() return not CC:GetCacheSize(true) end
|
||||
},
|
||||
wipeClassCacheLocal = {
|
||||
order = 56,
|
||||
type = "execute",
|
||||
name = L["Wipe Session Cache"],
|
||||
func = function()
|
||||
CC:WipeCache()
|
||||
GameTooltip:Hide()
|
||||
end,
|
||||
disabled = function() return not CC:GetCacheSize() end
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
media = {
|
||||
order = 6,
|
||||
order = 5,
|
||||
type = "group",
|
||||
name = L["Media"],
|
||||
get = function(info) return E.db.general[ info[getn(info)] ]; end,
|
||||
@@ -465,6 +424,74 @@ E.Options.args.general = {
|
||||
}
|
||||
}
|
||||
},
|
||||
classCache = {
|
||||
order = 6,
|
||||
type = "group",
|
||||
name = L["Class Cache"],
|
||||
args = {
|
||||
header = {
|
||||
order = 1,
|
||||
type = "header",
|
||||
name = L["Class Cache"]
|
||||
},
|
||||
classCacheEnable = {
|
||||
order = 2,
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
desc = L["Enable class caching to colorize names in chat and nameplates."],
|
||||
get = function(info) return E.private.general.classCache end,
|
||||
set = function(info, value)
|
||||
E.private.general.classCache = value
|
||||
CC:ToggleModule()
|
||||
end
|
||||
},
|
||||
classCacheStoreInDB = {
|
||||
order = 3,
|
||||
type = "toggle",
|
||||
name = L["Store cache in DB"],
|
||||
desc = L["If cache stored in DB it will be available between game sessions but increase memory usage.\nIn other way it will be wiped on relog or UI reload."],
|
||||
get = function(info) return E.db.general.classCacheStoreInDB end,
|
||||
set = function(info, value)
|
||||
E.db.general.classCacheStoreInDB = value
|
||||
CC:SwitchCacheType()
|
||||
end,
|
||||
disabled = function() return not E.private.general.classCache end
|
||||
},
|
||||
classCacheRequestInfo = {
|
||||
order = 4,
|
||||
type = "toggle",
|
||||
name = L["Request info for class cache"],
|
||||
desc = L["Use LibWho to cache class info"],
|
||||
get = function(info) return E.db.general.classCacheRequestInfo end,
|
||||
set = function(info, value)
|
||||
E.db.general.classCacheRequestInfo = value
|
||||
end,
|
||||
disabled = function() return not E.private.general.classCache end
|
||||
},
|
||||
wipeClassCacheGlobal = {
|
||||
order = 5,
|
||||
type = "execute",
|
||||
name = L["Wipe DB Cache"],
|
||||
buttonElvUI = true,
|
||||
func = function()
|
||||
CC:WipeCache(true)
|
||||
GameTooltip:Hide()
|
||||
end,
|
||||
disabled = function() return not CC:GetCacheSize(true) end
|
||||
},
|
||||
wipeClassCacheLocal = {
|
||||
order = 6,
|
||||
type = "execute",
|
||||
name = L["Wipe Session Cache"],
|
||||
buttonElvUI = true,
|
||||
func = function()
|
||||
CC:WipeCache()
|
||||
GameTooltip:Hide()
|
||||
end,
|
||||
disabled = function() return not CC:GetCacheSize() end
|
||||
}
|
||||
}
|
||||
},
|
||||
--[[totems = {
|
||||
order = 7,
|
||||
type = "group",
|
||||
|
||||
Reference in New Issue
Block a user