Merge branch 'dev'

This commit is contained in:
Crum
2018-11-24 16:12:42 -06:00
5 changed files with 335 additions and 255 deletions
+2 -2
View File
@@ -495,12 +495,12 @@ function EventTraceFrameEventHideButton_OnClick (button)
EventTraceFrame_Update(); EventTraceFrame_Update();
end end
local ERROR_FORMAT = [[|cffffd200Message:|r|cffffffff %s|r local ERROR_FORMAT = [[||cffffd200Message:|r|cffffffff %s|r
|cffffd200Time:|r|cffffffff %s|r |cffffd200Time:|r|cffffffff %s|r
|cffffd200Count:|r|cffffffff %s|r |cffffd200Count:|r|cffffffff %s|r
|cffffd200Stack:|r|cffffffff %s|r]]; |cffffd200Stack:|r|cffffffff %s|r]];
local WARNING_AS_ERROR_FORMAT = [[|cffffd200Message:|r|cffffffff %s|r local WARNING_AS_ERROR_FORMAT = [[||cffffd200Message:|r|cffffffff %s|r
|cffffd200Time:|r|cffffffff %s|r |cffffd200Time:|r|cffffffff %s|r
|cffffd200Count:|r|cffffffff %s|r]]; |cffffd200Count:|r|cffffffff %s|r]];
+21 -9
View File
@@ -199,8 +199,10 @@ function E:CreateBackdrop(f, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameE
end end
E:SetTemplate(b, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement) E:SetTemplate(b, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
if (parent:GetFrameLevel() - 1) >= 0 then local frameLevel = parent.GetFrameLevel and parent:GetFrameLevel()
b:SetFrameLevel(parent:GetFrameLevel() - 1) local frameLevelMinusOne = frameLevel and (frameLevel - 1)
if frameLevelMinusOne and (frameLevelMinusOne >= 0) then
b:SetFrameLevel(frameLevelMinusOne)
else else
b:SetFrameLevel(0) b:SetFrameLevel(0)
end end
@@ -235,22 +237,32 @@ function E:Kill(object)
object:Hide() object:Hide()
end end
function E:StripTextures(object, kill) function E:StripTextures(object, kill, alpha)
if object:IsObjectType("Texture") then
if kill then
E:Kill(object)
elseif alpha then
object:SetAlpha(0)
else
object:SetTexture(nil)
end
else
if object.GetNumRegions then
for i = 1, object:GetNumRegions() do for i = 1, object:GetNumRegions() do
local region = select(i, object:GetRegions()) local region = select(i, object:GetRegions())
if region and region:GetObjectType() == "Texture" then if region and region.IsObjectType and region:IsObjectType("Texture") then
if kill and type(kill) == "boolean" then if kill then
E:Kill(region) E:Kill(region)
elseif region:GetDrawLayer() == kill then elseif alpha then
region:SetTexture(nil) region:SetAlpha(0)
elseif kill and type(kill) == "string" and region:GetTexture() ~= kill then
region:SetTexture(nil)
else else
region:SetTexture(nil) region:SetTexture(nil)
end end
end end
end end
end end
end
end
function E:FontTemplate(fs, font, fontSize, fontStyle) function E:FontTemplate(fs, font, fontSize, fontStyle)
fs.font = font fs.font = font
+117 -63
View File
@@ -6,10 +6,16 @@ local CC = E:GetModule("ClassCache");
--Cache global variables --Cache global variables
--Lua functions --Lua functions
local select, unpack, type = select, unpack, type local select, unpack, type = select, unpack, type
local format, gsub, match, gmatch = string.format, string.gsub, string.match, string.gmatch local gsub, gmatch, format, lower, match = string.gsub, string.gmatch, string.format, string.lower, string.match
local strlower = strlower local strlower, split = strlower, string.split
--WoW API / Variables --WoW API / Variables
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local WorldFrame = WorldFrame
local WorldGetChildren = WorldFrame.GetChildren
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
--Message cache
local messageToSender = {}
function M:UpdateBubbleBorder() function M:UpdateBubbleBorder()
if not this.text then return end if not this.text then return end
@@ -26,13 +32,21 @@ function M:UpdateBubbleBorder()
end end
end end
local text = this.text:GetText()
if this.Name then
this.Name:SetText("") --Always reset it
if text and E.private.general.chatBubbleName then
M:AddChatBubbleName(this, messageToSender[text])
end
end
if E.private.chat.enable and E.private.general.classCache and E.private.general.classColorMentionsSpeech then if E.private.chat.enable and E.private.general.classCache and E.private.general.classColorMentionsSpeech then
local classColorTable, isFirstWord, rebuiltString, lowerCaseWord, tempWord, wordMatch, classMatch local classColorTable, isFirstWord, rebuiltString, lowerCaseWord, tempWord, wordMatch, classMatch
local text = this.text:GetText() if text and match(text, "%s-%S+%s*") then
if text and match(text, "%s-[^%s]+%s*") then for word in gmatch(text, "%s-%S+%s*") do
for word in gmatch(text, "%s-[^%s]+%s*") do
tempWord = gsub(word, "^[%s%p]-([^%s%p]+)([%-]?[^%s%p]-)[%s%p]*$","%1%2") tempWord = gsub(word, "^[%s%p]-([^%s%p]+)([%-]?[^%s%p]-)[%s%p]*$","%1%2")
lowerCaseWord = strlower(tempWord) lowerCaseWord = lower(tempWord)
classMatch = CC:GetCacheTable()[E.myrealm][tempWord] classMatch = CC:GetCacheTable()[E.myrealm][tempWord]
wordMatch = classMatch and lowerCaseWord wordMatch = classMatch and lowerCaseWord
@@ -57,6 +71,22 @@ function M:UpdateBubbleBorder()
end end
end end
function M:AddChatBubbleName(chatBubble, name)
if not name then return end
local defaultColor, color = "|cffffffff"
local name, realm = split("-", name)
local class = CC:GetClassByName(name, realm)
if class then
color = (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] and E:RGBToHex(CUSTOM_CLASS_COLORS[class].r, CUSTOM_CLASS_COLORS[class].g, CUSTOM_CLASS_COLORS[class].b)) or (RAID_CLASS_COLORS[class] and E:RGBToHex(RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b))
else
color = defaultColor
end
chatBubble.Name:SetText(format("%s%s|r", color, name))
end
function M:SkinBubble(frame) function M:SkinBubble(frame)
local mult = E.mult * UIParent:GetScale() local mult = E.mult * UIParent:GetScale()
for i = 1, frame:GetNumRegions() do for i = 1, frame:GetNumRegions() do
@@ -68,10 +98,25 @@ function M:SkinBubble(frame)
end end
end end
if frame.text then local name = frame:CreateFontString(nil, "OVERLAY")
if E.private.general.chatBubbles == "backdrop" then
name:SetPoint("TOPLEFT", 5, 19)
else
name:SetPoint("TOPLEFT", 5, 6)
end
name:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -5, -5)
name:SetJustifyH("LEFT")
E:FontTemplate(name, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize * 0.85, E.private.general.chatBubbleFontOutline)
frame.Name = name
if E.private.general.chatBubbles == "backdrop" then if E.private.general.chatBubbles == "backdrop" then
if E.PixelMode then if E.PixelMode then
E:SetTemplate(frame, "Transparent", true) frame:SetBackdrop({
bgFile = E["media"].blankTex,
edgeFile = E["media"].blankTex,
tile = false, tileSize = 0, edgeSize = mult,
insets = {left = 0, right = 0, top = 0, bottom = 0}
})
frame:SetBackdropColor(unpack(E.media.backdropfadecolor)) frame:SetBackdropColor(unpack(E.media.backdropfadecolor))
frame:SetBackdropBorderColor(0, 0, 0) frame:SetBackdropBorderColor(0, 0, 0)
else else
@@ -80,124 +125,133 @@ function M:SkinBubble(frame)
local r, g, b = frame.text:GetTextColor() local r, g, b = frame.text:GetTextColor()
if not E.PixelMode then if not E.PixelMode then
if not frame.backdrop then
frame.backdrop = frame:CreateTexture(nil, "BACKGROUND") frame.backdrop = frame:CreateTexture(nil, "BACKGROUND")
frame.backdrop:SetAllPoints(frame) frame.backdrop:SetAllPoints(frame)
frame.backdrop:SetTexture(unpack(E.media.backdropfadecolor)) frame.backdrop:SetTexture(unpack(E.media.backdropfadecolor))
frame.bordertop = frame:CreateTexture(nil, "OVERLAY") frame.bordertop = frame:CreateTexture(nil, "ARTWORK")
E:Point(frame.bordertop, "TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) frame.bordertop:SetPoint("TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2)
E:Point(frame.bordertop, "TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) frame.bordertop:SetPoint("TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2)
E:Height(frame.bordertop, mult) frame.bordertop:SetHeight(mult)
frame.bordertop:SetTexture(r, g, b) frame.bordertop:SetTexture(r, g, b)
frame.bordertop.backdrop = frame:CreateTexture(nil, "BORDER") frame.bordertop.backdrop = frame:CreateTexture(nil, "BORDER")
E:Point(frame.bordertop.backdrop, "TOPLEFT", frame.bordertop, "TOPLEFT", -mult, mult) frame.bordertop.backdrop:SetPoint("TOPLEFT", frame.bordertop, "TOPLEFT", -mult, mult)
E:Point(frame.bordertop.backdrop, "TOPRIGHT", frame.bordertop, "TOPRIGHT", mult, mult) frame.bordertop.backdrop:SetPoint("TOPRIGHT", frame.bordertop, "TOPRIGHT", mult, mult)
E:Height(frame.bordertop.backdrop, mult * 3) frame.bordertop.backdrop:SetHeight(mult * 3)
frame.bordertop.backdrop:SetTexture(0, 0, 0) frame.bordertop.backdrop:SetTexture(0, 0, 0)
frame.borderbottom = frame:CreateTexture(nil, "OVERLAY") frame.borderbottom = frame:CreateTexture(nil, "ARTWORK")
E:Point(frame.borderbottom, "BOTTOMLEFT", frame, "BOTTOMLEFT", -mult*2, -mult*2) frame.borderbottom:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -mult*2, -mult*2)
E:Point(frame.borderbottom, "BOTTOMRIGHT", frame, "BOTTOMRIGHT", mult*2, -mult*2) frame.borderbottom:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", mult*2, -mult*2)
E:Height(frame.borderbottom, mult) frame.borderbottom:SetHeight(mult)
frame.borderbottom:SetTexture(r, g, b) frame.borderbottom:SetTexture(r, g, b)
frame.borderbottom.backdrop = frame:CreateTexture(nil, "BORDER") frame.borderbottom.backdrop = frame:CreateTexture(nil, "BORDER")
E:Point(frame.borderbottom.backdrop, "BOTTOMLEFT", frame.borderbottom, "BOTTOMLEFT", -mult, -mult) frame.borderbottom.backdrop:SetPoint("BOTTOMLEFT", frame.borderbottom, "BOTTOMLEFT", -mult, -mult)
E:Point(frame.borderbottom.backdrop, "BOTTOMRIGHT", frame.borderbottom, "BOTTOMRIGHT", mult, -mult) frame.borderbottom.backdrop:SetPoint("BOTTOMRIGHT", frame.borderbottom, "BOTTOMRIGHT", mult, -mult)
E:Height(frame.borderbottom.backdrop, mult * 3) frame.borderbottom.backdrop:SetHeight(mult * 3)
frame.borderbottom.backdrop:SetTexture(0, 0, 0) frame.borderbottom.backdrop:SetTexture(0, 0, 0)
frame.borderleft = frame:CreateTexture(nil, "OVERLAY") frame.borderleft = frame:CreateTexture(nil, "ARTWORK")
E:Point(frame.borderleft, "TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) frame.borderleft:SetPoint("TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2)
E:Point(frame.borderleft, "BOTTOMLEFT", frame, "BOTTOMLEFT", mult*2, -mult*2) frame.borderleft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", mult*2, -mult*2)
E:Width(frame.borderleft, mult) frame.borderleft:SetWidth(mult)
frame.borderleft:SetTexture(r, g, b) frame.borderleft:SetTexture(r, g, b)
frame.borderleft.backdrop = frame:CreateTexture(nil, "BORDER") frame.borderleft.backdrop = frame:CreateTexture(nil, "BORDER")
E:Point(frame.borderleft.backdrop, "TOPLEFT", frame.borderleft, "TOPLEFT", -mult, mult) frame.borderleft.backdrop:SetPoint("TOPLEFT", frame.borderleft, "TOPLEFT", -mult, mult)
E:Point(frame.borderleft.backdrop, "BOTTOMLEFT", frame.borderleft, "BOTTOMLEFT", -mult, -mult) frame.borderleft.backdrop:SetPoint("BOTTOMLEFT", frame.borderleft, "BOTTOMLEFT", -mult, -mult)
E:Width(frame.borderleft.backdrop, mult * 3) frame.borderleft.backdrop:SetWidth(mult * 3)
frame.borderleft.backdrop:SetTexture(0, 0, 0) frame.borderleft.backdrop:SetTexture(0, 0, 0)
frame.borderright = frame:CreateTexture(nil, "OVERLAY") frame.borderright = frame:CreateTexture(nil, "ARTWORK")
E:Point(frame.borderright, "TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) frame.borderright:SetPoint("TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2)
E:Point(frame.borderright, "BOTTOMRIGHT", frame, "BOTTOMRIGHT", -mult*2, -mult*2) frame.borderright:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -mult*2, -mult*2)
E:Width(frame.borderright, mult) frame.borderright:SetWidth(mult)
frame.borderright:SetTexture(r, g, b) frame.borderright:SetTexture(r, g, b)
frame.borderright.backdrop = frame:CreateTexture(nil, "BORDER") frame.borderright.backdrop = frame:CreateTexture(nil, "BORDER")
E:Point(frame.borderright.backdrop, "TOPRIGHT", frame.borderright, "TOPRIGHT", mult, mult) frame.borderright.backdrop:SetPoint("TOPRIGHT", frame.borderright, "TOPRIGHT", mult, mult)
E:Point(frame.borderright.backdrop, "BOTTOMRIGHT", frame.borderright, "BOTTOMRIGHT", mult, -mult) frame.borderright.backdrop:SetPoint("BOTTOMRIGHT", frame.borderright, "BOTTOMRIGHT", mult, -mult)
E:Width(frame.borderright.backdrop, mult * 3) frame.borderright.backdrop:SetWidth(mult * 3)
frame.borderright.backdrop:SetTexture(0, 0, 0) frame.borderright.backdrop:SetTexture(0, 0, 0)
end
else else
frame:SetBackdropColor(unpack(E.media.backdropfadecolor)) frame:SetBackdropColor(unpack(E.media.backdropfadecolor))
frame:SetBackdropBorderColor(r, g, b) frame:SetBackdropBorderColor(r, g, b)
end end
E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline) E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline);
elseif E.private.general.chatBubbles == "backdrop_noborder" then elseif E.private.general.chatBubbles == "backdrop_noborder" then
frame:SetBackdrop(nil) frame:SetBackdrop(nil)
if not frame.backdrop then
frame.backdrop = frame:CreateTexture(nil, "ARTWORK") frame.backdrop = frame:CreateTexture(nil, "ARTWORK")
E:SetInside(frame.backdrop, frame, 4, 4) E:SetInside(frame.backdrop, frame, 4, 4)
frame.backdrop:SetTexture(unpack(E.media.backdropfadecolor)) frame.backdrop:SetTexture(unpack(E.media.backdropfadecolor))
end
E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline) E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline)
frame:SetClampedToScreen(false) frame:SetClampedToScreen(false)
elseif E.private.general.chatBubbles == "nobackdrop" then elseif E.private.general.chatBubbles == "nobackdrop" then
frame:SetBackdrop(nil) frame:SetBackdrop(nil)
E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline) E:FontTemplate(frame.text, E.LSM:Fetch("font", E.private.general.chatBubbleFont), E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline)
frame:SetClampedToScreen(false) frame:SetClampedToScreen(false)
end frame.Name:Hide()
end end
HookScript(frame, "OnShow", M.UpdateBubbleBorder) HookScript(frame, "OnShow", M.UpdateBubbleBorder)
frame:SetFrameStrata("DIALOG") frame:SetFrameStrata("DIALOG")
M.UpdateBubbleBorder(frame) M.UpdateBubbleBorder(frame)
frame.isBubblePowered = true
frame.isSkinnedElvUI = true
end end
function M:IsChatBubble(frame) function M:IsChatBubble(frame)
for i = 1, frame:GetNumRegions() do for i = 1, frame:GetNumRegions() do
local region = select(i, frame:GetRegions()) local region = select(i, frame:GetRegions())
if region.GetTexture and region:GetTexture() and type(region:GetTexture() == "string" and strlower(region:GetTexture()) == [[interface\tooltips\chatbubble-background]]) then return true end if region.GetTexture and region:GetTexture() and type(region:GetTexture() == "string") and strlower(region:GetTexture()) == [[interface\tooltips\chatbubble-background]] then return true end
end end
return false return false
end end
local numChildren = 0 local function ChatBubble_OnEvent()
function M:LoadChatBubbles() if not E.private.general.chatBubbleName then return end
if E.private.general.bubbles == false then
E.private.general.chatBubbles = "disabled" messageToSender[arg1] = arg2
E.private.general.bubbles = nil
end end
if E.private.general.chatBubbles == "disabled" then return end local numChildren = 0
local function ChatBubble_OnUpdate()
if not M.BubbleFrame.lastupdate then
M.BubbleFrame.lastupdate = -2 -- wait 2 seconds before hooking frames
end
local frame = CreateFrame("Frame") M.BubbleFrame.lastupdate = M.BubbleFrame.lastupdate + arg1
frame.lastupdate = -2 if M.BubbleFrame.lastupdate < .1 then return end
M.BubbleFrame.lastupdate = 0
frame:SetScript("OnUpdate", function() local count = select("#", WorldGetChildren(WorldFrame))
this.lastupdate = this.lastupdate + arg1
if this.lastupdate < .1 then return end
this.lastupdate = 0
local count = WorldFrame:GetNumChildren()
if count ~= numChildren then if count ~= numChildren then
for i = numChildren + 1, count do for i = numChildren + 1, count do
local frame = select(i, WorldFrame:GetChildren()) local frame = select(i, WorldGetChildren(WorldFrame))
if frame.GetObjectType and frame:GetObjectType() == "Frame" and M:IsChatBubble(frame) then if M:IsChatBubble(frame) then
if not frame.isSkinnedElvUI then
M:SkinBubble(frame) M:SkinBubble(frame)
end end
end end
end
numChildren = count numChildren = count
end end
end) end
function M:LoadChatBubbles()
if E.private.general.chatBubbles == "disabled" then return end
self.BubbleFrame = CreateFrame("Frame")
self.BubbleFrame:RegisterEvent("CHAT_MSG_SAY")
self.BubbleFrame:RegisterEvent("CHAT_MSG_YELL")
self.BubbleFrame:RegisterEvent("CHAT_MSG_PARTY")
self.BubbleFrame:RegisterEvent("CHAT_MSG_MONSTER_SAY")
self.BubbleFrame:RegisterEvent("CHAT_MSG_MONSTER_YELL")
self.BubbleFrame:SetScript("OnEvent", ChatBubble_OnEvent)
self.BubbleFrame:SetScript("OnUpdate", ChatBubble_OnUpdate)
end end
+1
View File
@@ -14,6 +14,7 @@ V["general"] = {
["chatBubbleFont"] = "PT Sans Narrow", ["chatBubbleFont"] = "PT Sans Narrow",
["chatBubbleFontSize"] = 14, ["chatBubbleFontSize"] = 14,
["chatBubbleFontOutline"] = "NONE", ["chatBubbleFontOutline"] = "NONE",
["chatBubbleName"] = false,
["pixelPerfect"] = true, ["pixelPerfect"] = true,
["replaceBlizzFonts"] = true, ["replaceBlizzFonts"] = true,
["minimap"] = { ["minimap"] = {
+139 -126
View File
@@ -1,11 +1,15 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local CC = E:GetModule("ClassCache"); local CC = E:GetModule("ClassCache")
--Cache global variables --Cache global variables
--Lua functions --Lua functions
local _G = _G
local getn = table.getn local getn = table.getn
--WoW API / Variables --WoW API / Variables
local CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY = CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY local FCF_GetNumActiveChatFrames = FCF_GetNumActiveChatFrames
local NONE, FONT_SIZE, COLOR, DISABLE = NONE, FONT_SIZE, COLOR, DISABLE
local PLAYER, LOOT = PLAYER, LOOT
local SAY, CHAT_MSG_EMOTE = SAY, CHAT_MSG_EMOTE
local function GetChatWindowInfo() local function GetChatWindowInfo()
local ChatTabInfo = {} local ChatTabInfo = {}
@@ -23,15 +27,15 @@ E.Options.args.general = {
name = GENERAL, name = GENERAL,
order = 1, order = 1,
childGroups = "tab", childGroups = "tab",
get = function(info) return E.db.general[ info[getn(info)] ]; end, get = function(info) return E.db.general[ info[getn(info)] ] end,
set = function(info, value) E.db.general[ info[getn(info)] ] = value; end, set = function(info, value) E.db.general[ info[getn(info)] ] = value end,
args = { args = {
versionCheck = { versionCheck = {
order = 1, order = 1,
type = "toggle", type = "toggle",
name = L["Version Check"], name = L["Version Check"],
get = function(info) return E.global.general.versionCheck; end, get = function(info) return E.global.general.versionCheck end,
set = function(info, value) E.global.general.versionCheck = value; end set = function(info, value) E.global.general.versionCheck = value end
}, },
spacer = { spacer = {
order = 2, order = 2,
@@ -59,8 +63,8 @@ E.Options.args.general = {
type = "toggle", type = "toggle",
name = L["Thin Border Theme"], name = L["Thin Border Theme"],
desc = L["The Thin Border Theme option will change the overall apperance of your UI. Using Thin Border Theme is a slight performance increase over the traditional layout."], desc = L["The Thin Border Theme option will change the overall apperance of your UI. Using Thin Border Theme is a slight performance increase over the traditional layout."],
get = function(info) return E.private.general.pixelPerfect; end, get = function(info) return E.private.general.pixelPerfect end,
set = function(info, value) E.private.general.pixelPerfect = value; E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general.pixelPerfect = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
messageRedirect = { messageRedirect = {
order = 2, order = 2,
@@ -104,40 +108,40 @@ E.Options.args.general = {
type = "toggle", type = "toggle",
name = L["Auto Greed/DE"], 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."], 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 disabled = function() return not E.private.general.lootRoll end
}, },
loot = { loot = {
order = 7, order = 7,
type = "toggle", type = "toggle",
name = L["Loot"], name = LOOT,
desc = L["Enable/Disable the loot frame."], desc = L["Enable/Disable the loot frame."],
get = function(info) return E.private.general.loot; end, get = function(info) return E.private.general.loot end,
set = function(info, value) E.private.general.loot = value; E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general.loot = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
lootRoll = { lootRoll = {
order = 8, order = 8,
type = "toggle", type = "toggle",
name = L["Loot Roll"], name = L["Loot Roll"],
desc = L["Enable/Disable the loot roll frame."], desc = L["Enable/Disable the loot roll frame."],
get = function(info) return E.private.general.lootRoll; end, get = function(info) return E.private.general.lootRoll end,
set = function(info, value) E.private.general.lootRoll = value; E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general.lootRoll = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
lootUnderMouse = { lootUnderMouse = {
order = 9, order = 9,
type = "toggle", type = "toggle",
name = L["Loot Under Mouse"], name = L["Loot Under Mouse"],
desc = L["Enable/Disable loot frame under the mouse cursor."], desc = L["Enable/Disable loot frame under the mouse cursor."],
get = function(info) return E.private.general.lootUnderMouse; end, get = function(info) return E.private.general.lootUnderMouse end,
set = function(info, value) E.private.general.lootUnderMouse = value; end, set = function(info, value) E.private.general.lootUnderMouse = value end,
disabled = function() return not E.private.general.loot; end disabled = function() return not E.private.general.loot end
}, },
eyefinity = { eyefinity = {
order = 10, order = 10,
name = L["Multi-Monitor Support"], name = L["Multi-Monitor Support"],
desc = L["Attempt to support eyefinity/nvidia surround."], desc = L["Attempt to support eyefinity/nvidia surround."],
type = "toggle", type = "toggle",
get = function(info) return E.global.general.eyefinity; end, get = function(info) return E.global.general.eyefinity end,
set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL"); end set = function(info, value) E.global.general[ info[getn(info)] ] = value E:StaticPopup_Show("GLOBAL_RL") end
}, },
hideErrorFrame = { hideErrorFrame = {
order = 11, order = 11,
@@ -150,24 +154,24 @@ E.Options.args.general = {
type = "toggle", type = "toggle",
name = L["Bottom Panel"], name = L["Bottom Panel"],
desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."], desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."],
get = function(info) return E.db.general.bottomPanel; end, get = function(info) return E.db.general.bottomPanel end,
set = function(info, value) E.db.general.bottomPanel = value; E:GetModule("Layout"):BottomPanelVisibility(); end set = function(info, value) E.db.general.bottomPanel = value E:GetModule("Layout"):BottomPanelVisibility() end
}, },
topPanel = { topPanel = {
order = 13, order = 13,
type = "toggle", type = "toggle",
name = L["Top Panel"], name = L["Top Panel"],
desc = L["Display a panel across the top of the screen. This is for cosmetic only."], desc = L["Display a panel across the top of the screen. This is for cosmetic only."],
get = function(info) return E.db.general.topPanel; end, get = function(info) return E.db.general.topPanel end,
set = function(info, value) E.db.general.topPanel = value; E:GetModule("Layout"):TopPanelVisibility(); end set = function(info, value) E.db.general.topPanel = value E:GetModule("Layout"):TopPanelVisibility() end
}, },
afk = { afk = {
order = 14, order = 14,
type = "toggle", type = "toggle",
name = L["AFK Mode"], name = L["AFK Mode"],
desc = L["When you go AFK display the AFK screen."], desc = L["When you go AFK display the AFK screen."],
get = function(info) return E.db.general.afk; end, get = function(info) return E.db.general.afk end,
set = function(info, value) E.db.general.afk = value; E:GetModule("AFK"):Toggle(); end set = function(info, value) E.db.general.afk = value E:GetModule("AFK"):Toggle() end
}, },
enhancedPvpMessages = { enhancedPvpMessages = {
order = 15, order = 15,
@@ -181,30 +185,30 @@ E.Options.args.general = {
name = RAID_CONTROL, name = RAID_CONTROL,
desc = L["Enables the ElvUI Raid Control panel."], desc = L["Enables the ElvUI Raid Control panel."],
get = function(info) return E.private.general.raidUtility end, get = function(info) return E.private.general.raidUtility end,
set = function(info, value) E.private.general.raidUtility = value; E:StaticPopup_Show("PRIVATE_RL") end set = function(info, value) E.private.general.raidUtility = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
autoScale = { autoScale = {
order = 17, order = 17,
name = L["Auto Scale"], name = L["Auto Scale"],
desc = L["Automatically scale the User Interface based on your screen resolution"], desc = L["Automatically scale the User Interface based on your screen resolution"],
type = "toggle", type = "toggle",
get = function(info) return E.global.general.autoScale; end, get = function(info) return E.global.general.autoScale end,
set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL") end set = function(info, value) E.global.general[ info[getn(info)] ] = value E:StaticPopup_Show("GLOBAL_RL") end
}, },
minUiScale = { minUiScale = {
order = 18, order = 18,
type = "range", type = "range",
name = L["Lowest Allowed UI Scale"], name = L["Lowest Allowed UI Scale"],
min = 0.32, max = 0.64, step = 0.01, min = 0.32, max = 0.64, step = 0.01,
get = function(info) return E.global.general.minUiScale; end, get = function(info) return E.global.general.minUiScale end,
set = function(info, value) E.global.general.minUiScale = value; E:StaticPopup_Show("GLOBAL_RL"); end set = function(info, value) E.global.general.minUiScale = value E:StaticPopup_Show("GLOBAL_RL") end
}, },
numberPrefixStyle = { numberPrefixStyle = {
order = 19, order = 19,
type = "select", type = "select",
name = L["Number Prefix"], name = L["Number Prefix"],
get = function(info) return E.db.general.numberPrefixStyle; end, get = function(info) return E.db.general.numberPrefixStyle end,
set = function(info, value) E.db.general.numberPrefixStyle = value; E:StaticPopup_Show("CONFIG_RL"); end, set = function(info, value) E.db.general.numberPrefixStyle = value E:StaticPopup_Show("CONFIG_RL") end,
values = { values = {
["METRIC"] = "Metric (k, M, G)", ["METRIC"] = "Metric (k, M, G)",
["ENGLISH"] = "English (K, M, B)", ["ENGLISH"] = "English (K, M, B)",
@@ -220,7 +224,7 @@ E.Options.args.general = {
desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."], desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."],
min = 0, max = 4, step = 1, min = 0, max = 4, step = 1,
get = function(info) return E.db.general.decimalLength end, get = function(info) return E.db.general.decimalLength end,
set = function(info, value) E.db.general.decimalLength = value; E:StaticPopup_Show("GLOBAL_RL") end set = function(info, value) E.db.general.decimalLength = value E:StaticPopup_Show("GLOBAL_RL") end
} }
} }
}, },
@@ -228,7 +232,7 @@ E.Options.args.general = {
order = 5, order = 5,
type = "group", type = "group",
name = L["Media"], name = L["Media"],
get = function(info) return E.db.general[ info[getn(info)] ]; end, get = function(info) return E.db.general[ info[getn(info)] ] end,
set = function(info, value) E.db.general[ info[getn(info)] ] = value end, set = function(info, value) E.db.general[ info[getn(info)] ] = value end,
args = { args = {
fontHeader = { fontHeader = {
@@ -242,7 +246,7 @@ E.Options.args.general = {
name = FONT_SIZE, name = FONT_SIZE,
desc = L["Set the font size for everything in UI. Note: This doesn't effect somethings that have their own seperate options (UnitFrame Font, Datatext Font, ect..)"], desc = L["Set the font size for everything in UI. Note: This doesn't effect somethings that have their own seperate options (UnitFrame Font, Datatext Font, ect..)"],
min = 4, max = 33, step = 1, min = 4, max = 33, step = 1,
set = function(info, value) E.db.general[ info[getn(info)] ] = value; E:UpdateMedia(); E:UpdateFontTemplates(); end set = function(info, value) E.db.general[ info[getn(info)] ] = value E:UpdateMedia() E:UpdateFontTemplates() end
}, },
font = { font = {
order = 3, order = 3,
@@ -250,14 +254,14 @@ E.Options.args.general = {
name = L["Default Font"], name = L["Default Font"],
desc = L["The font that the core of the UI will use."], desc = L["The font that the core of the UI will use."],
values = AceGUIWidgetLSMlists.font, values = AceGUIWidgetLSMlists.font,
set = function(info, value) E.db.general[ info[getn(info)] ] = value; E:UpdateMedia(); E:UpdateFontTemplates(); end, set = function(info, value) E.db.general[ info[getn(info)] ] = value E:UpdateMedia() E:UpdateFontTemplates() end,
}, },
applyFontToAll = { applyFontToAll = {
order = 4, order = 4,
type = "execute", type = "execute",
name = L["Apply Font To All"], name = L["Apply Font To All"],
desc = L["Applies the font and font size settings throughout the entire user interface. Note: Some font size settings will be skipped due to them having a smaller font size by default."], desc = L["Applies the font and font size settings throughout the entire user interface. Note: Some font size settings will be skipped due to them having a smaller font size by default."],
func = function() E:StaticPopup_Show("APPLY_FONT_WARNING"); end func = function() E:StaticPopup_Show("APPLY_FONT_WARNING") end
}, },
dmgfont = { dmgfont = {
order = 5, order = 5,
@@ -265,8 +269,8 @@ E.Options.args.general = {
name = L["CombatText Font"], name = L["CombatText Font"],
desc = L["The font that combat text will use. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"], desc = L["The font that combat text will use. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"],
values = AceGUIWidgetLSMlists.font, values = AceGUIWidgetLSMlists.font,
get = function(info) return E.private.general[ info[getn(info)] ]; end, get = function(info) return E.private.general[ info[getn(info)] ] end,
set = function(info, value) E.private.general[ info[getn(info)] ] = value; E:UpdateMedia(); E:UpdateFontTemplates(); E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general[ info[getn(info)] ] = value E:UpdateMedia() E:UpdateFontTemplates() E:StaticPopup_Show("PRIVATE_RL") end
}, },
namefont = { namefont = {
order = 6, order = 6,
@@ -274,16 +278,16 @@ E.Options.args.general = {
name = L["Name Font"], name = L["Name Font"],
desc = L["The font that appears on the text above players heads. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"], desc = L["The font that appears on the text above players heads. |cffFF0000WARNING: This requires a game restart or re-log for this change to take effect.|r"],
values = AceGUIWidgetLSMlists.font, values = AceGUIWidgetLSMlists.font,
get = function(info) return E.private.general[ info[getn(info)] ]; end, get = function(info) return E.private.general[ info[getn(info)] ] end,
set = function(info, value) E.private.general[ info[getn(info)] ] = value; E:UpdateMedia(); E:UpdateFontTemplates(); E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general[ info[getn(info)] ] = value E:UpdateMedia() E:UpdateFontTemplates() E:StaticPopup_Show("PRIVATE_RL") end
}, },
replaceBlizzFonts = { replaceBlizzFonts = {
order = 7, order = 7,
type = "toggle", type = "toggle",
name = L["Replace Blizzard Fonts"], name = L["Replace Blizzard Fonts"],
desc = L["Replaces the default Blizzard fonts on various panels and frames with the fonts chosen in the Media section of the ElvUI config. NOTE: Any font that inherits from the fonts ElvUI usually replaces will be affected as well if you disable this. Enabled by default."], desc = L["Replaces the default Blizzard fonts on various panels and frames with the fonts chosen in the Media section of the ElvUI config. NOTE: Any font that inherits from the fonts ElvUI usually replaces will be affected as well if you disable this. Enabled by default."],
get = function(info) return E.private.general[ info[getn(info)] ]; end, get = function(info) return E.private.general[ info[getn(info)] ] end,
set = function(info, value) E.private.general[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.general[ info[getn(info)] ] = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
texturesHeaderSpacing = { texturesHeaderSpacing = {
order = 8, order = 8,
@@ -301,17 +305,17 @@ E.Options.args.general = {
name = L["Primary Texture"], name = L["Primary Texture"],
desc = L["The texture that will be used mainly for statusbars."], desc = L["The texture that will be used mainly for statusbars."],
values = AceGUIWidgetLSMlists.statusbar, values = AceGUIWidgetLSMlists.statusbar,
get = function(info) return E.private.general[ info[getn(info)] ]; end, get = function(info) return E.private.general[ info[getn(info)] ] end,
set = function(info, value) set = function(info, value)
local previousValue = E.private.general[ info[getn(info)] ]; local previousValue = E.private.general[ info[getn(info)] ]
E.private.general[ info[getn(info)] ] = value; E.private.general[ info[getn(info)] ] = value
if(E.db.unitframe.statusbar == previousValue) then if(E.db.unitframe.statusbar == previousValue) then
E.db.unitframe.statusbar = value; E.db.unitframe.statusbar = value
E:UpdateAll(true); E:UpdateAll(true)
else else
E:UpdateMedia(); E:UpdateMedia()
E:UpdateStatusBars(); E:UpdateStatusBars()
end end
end end
}, },
@@ -321,11 +325,11 @@ E.Options.args.general = {
name = L["Secondary Texture"], name = L["Secondary Texture"],
desc = L["This texture will get used on objects like chat windows and dropdown menus."], desc = L["This texture will get used on objects like chat windows and dropdown menus."],
values = AceGUIWidgetLSMlists.statusbar, values = AceGUIWidgetLSMlists.statusbar,
get = function(info) return E.private.general[ info[getn(info)] ]; end, get = function(info) return E.private.general[ info[getn(info)] ] end,
set = function(info, value) set = function(info, value)
E.private.general[ info[getn(info)] ] = value; E.private.general[ info[getn(info)] ] = value
E:UpdateMedia(); E:UpdateMedia()
E:UpdateFrameTemplates(); E:UpdateFrameTemplates()
end end
}, },
applyTextureToAll = { applyTextureToAll = {
@@ -334,9 +338,9 @@ E.Options.args.general = {
name = L["Apply Texture To All"], name = L["Apply Texture To All"],
desc = L["Applies the primary texture to all statusbars."], desc = L["Applies the primary texture to all statusbars."],
func = function() func = function()
local texture = E.private.general.normTex; local texture = E.private.general.normTex
E.db.unitframe.statusbar = texture; E.db.unitframe.statusbar = texture
E:UpdateAll(true); E:UpdateAll(true)
end end
}, },
colorsHeaderSpacing = { colorsHeaderSpacing = {
@@ -347,7 +351,7 @@ E.Options.args.general = {
colorsHeader = { colorsHeader = {
order = 14, order = 14,
type = "header", type = "header",
name = L["Colors"] name = COLOR
}, },
bordercolor = { bordercolor = {
type = "color", type = "color",
@@ -356,15 +360,15 @@ E.Options.args.general = {
desc = L["Main border color of the UI."], desc = L["Main border color of the UI."],
hasAlpha = false, hasAlpha = false,
get = function(info) get = function(info)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
local d = P.general[info[getn(info)]]; local d = P.general[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b; return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end, end,
set = function(info, r, g, b) set = function(info, r, g, b)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b; t.r, t.g, t.b = r, g, b
E:UpdateMedia(); E:UpdateMedia()
E:UpdateBorderColors(); E:UpdateBorderColors()
end, end,
}, },
backdropcolor = { backdropcolor = {
@@ -374,15 +378,15 @@ E.Options.args.general = {
desc = L["Main backdrop color of the UI."], desc = L["Main backdrop color of the UI."],
hasAlpha = false, hasAlpha = false,
get = function(info) get = function(info)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
local d = P.general[info[getn(info)]]; local d = P.general[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b; return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end, end,
set = function(info, r, g, b) set = function(info, r, g, b)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b; t.r, t.g, t.b = r, g, b
E:UpdateMedia(); E:UpdateMedia()
E:UpdateBackdropColors(); E:UpdateBackdropColors()
end end
}, },
backdropfadecolor = { backdropfadecolor = {
@@ -392,16 +396,16 @@ E.Options.args.general = {
desc = L["Backdrop color of transparent frames"], desc = L["Backdrop color of transparent frames"],
hasAlpha = true, hasAlpha = true,
get = function(info) get = function(info)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
local d = P.general[info[getn(info)]]; local d = P.general[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a; return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
end, end,
set = function(info, r, g, b, a) set = function(info, r, g, b, a)
E.db.general[ info[getn(info)] ] = {}; E.db.general[ info[getn(info)] ] = {}
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
t.r, t.g, t.b, t.a = r, g, b, a; t.r, t.g, t.b, t.a = r, g, b, a
E:UpdateMedia(); E:UpdateMedia()
E:UpdateBackdropColors(); E:UpdateBackdropColors()
end end
}, },
valuecolor = { valuecolor = {
@@ -411,15 +415,15 @@ E.Options.args.general = {
desc = L["Color some texts use."], desc = L["Color some texts use."],
hasAlpha = false, hasAlpha = false,
get = function(info) get = function(info)
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
local d = P.general[info[getn(info)]]; local d = P.general[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b; return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end, end,
set = function(info, r, g, b, a) set = function(info, r, g, b, a)
E.db.general[ info[getn(info)] ] = {}; E.db.general[ info[getn(info)] ] = {}
local t = E.db.general[ info[getn(info)] ]; local t = E.db.general[ info[getn(info)] ]
t.r, t.g, t.b, t.a = r, g, b, a; t.r, t.g, t.b, t.a = r, g, b, a
E:UpdateMedia(); E:UpdateMedia()
end end
} }
} }
@@ -496,8 +500,8 @@ E.Options.args.general = {
order = 7, order = 7,
type = "group", type = "group",
name = TUTORIAL_TITLE47, name = TUTORIAL_TITLE47,
get = function(info) return E.db.general.totems[ info[getn(info)] ]; end, get = function(info) return E.db.general.totems[ info[getn(info)] ] end,
set = function(info, value) E.db.general.totems[ info[getn(info)] ] = value; E:GetModule("Totems"):PositionAndSize(); end, set = function(info, value) E.db.general.totems[ info[getn(info)] ] = value E:GetModule("Totems"):PositionAndSize() end,
args = { args = {
header = { header = {
order = 1, order = 1,
@@ -508,7 +512,7 @@ E.Options.args.general = {
order = 2, order = 2,
type = "toggle", type = "toggle",
name = L["Enable"], name = L["Enable"],
set = function(info, value) E.db.general.totems[ info[getn(info)] ] = value; E:GetModule("Totems"):ToggleEnable(); end set = function(info, value) E.db.general.totems[ info[getn(info)] ] = value E:GetModule("Totems"):ToggleEnable() end
}, },
size = { size = {
order = 3, order = 3,
@@ -547,14 +551,14 @@ E.Options.args.general = {
order = 8, order = 8,
name = L["Cooldown Text"], name = L["Cooldown Text"],
get = function(info) get = function(info)
local t = E.db.cooldown[ info[getn(info)] ]; local t = E.db.cooldown[ info[getn(info)] ]
local d = P.cooldown[info[getn(info)]]; local d = P.cooldown[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b; return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end, end,
set = function(info, r, g, b) set = function(info, r, g, b)
local t = E.db.cooldown[ info[getn(info)] ]; local t = E.db.cooldown[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b; t.r, t.g, t.b = r, g, b
E:UpdateCooldownSettings(); E:UpdateCooldownSettings()
end, end,
args = { args = {
header = { header = {
@@ -567,8 +571,8 @@ E.Options.args.general = {
order = 2, order = 2,
name = L["Enable"], name = L["Enable"],
desc = L["Display cooldown text on anything with the cooldown spiral."], desc = L["Display cooldown text on anything with the cooldown spiral."],
get = function(info) return E.private.cooldown[ info[getn(info)] ]; end, get = function(info) return E.private.cooldown[ info[getn(info)] ] end,
set = function(info, value) E.private.cooldown[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end set = function(info, value) E.private.cooldown[ info[getn(info)] ] = value E:StaticPopup_Show("PRIVATE_RL") end
}, },
threshold = { threshold = {
type = "range", type = "range",
@@ -576,10 +580,10 @@ E.Options.args.general = {
name = L["Low Threshold"], name = L["Low Threshold"],
desc = L["Threshold before text turns red and is in decimal form. Set to -1 for it to never turn red"], desc = L["Threshold before text turns red and is in decimal form. Set to -1 for it to never turn red"],
min = -1, max = 20, step = 1, min = -1, max = 20, step = 1,
get = function(info) return E.db.cooldown[ info[getn(info)] ]; end, get = function(info) return E.db.cooldown[ info[getn(info)] ] end,
set = function(info, value) set = function(info, value)
E.db.cooldown[ info[getn(info)] ] = value; E.db.cooldown[ info[getn(info)] ] = value
E:UpdateCooldownSettings(); E:UpdateCooldownSettings()
end end
}, },
expiringColor = { expiringColor = {
@@ -629,45 +633,54 @@ E.Options.args.general = {
type = "select", type = "select",
name = L["Chat Bubbles Style"], name = L["Chat Bubbles Style"],
desc = L["Skin the blizzard chat bubbles."], desc = L["Skin the blizzard chat bubbles."],
get = function(info) return E.private.general.chatBubbles; end, get = function(info) return E.private.general.chatBubbles end,
set = function(info, value) E.private.general.chatBubbles = value; E:StaticPopup_Show("PRIVATE_RL"); end, set = function(info, value) E.private.general.chatBubbles = value E:StaticPopup_Show("PRIVATE_RL") end,
values = { values = {
["backdrop"] = L["Skin Backdrop"], ["backdrop"] = L["Skin Backdrop"],
["nobackdrop"] = L["Remove Backdrop"], ["nobackdrop"] = L["Remove Backdrop"],
["backdrop_noborder"] = L["Skin Backdrop (No Borders)"], ["backdrop_noborder"] = L["Skin Backdrop (No Borders)"],
["disabled"] = L["Disabled"] ["disabled"] = DISABLE
} }
}, },
spacer = { name = {
order = 3, order = 3,
type = "toggle",
name = L["Chat Bubble Names"],
desc = L["Display the name of the unit on the chat bubble."],
get = function(info) return E.private.general.chatBubbleName end,
set = function(info, value) E.private.general.chatBubbleName = value E:StaticPopup_Show("PRIVATE_RL") end,
disabled = function() return E.private.general.chatBubbles == "nobackdrop" or E.private.general.chatBubbles == "disabled" end
},
spacer = {
order = 4,
type = "description", type = "description",
name = " ", name = " ",
}, },
font = { font = {
order = 4, order = 5,
type = "select", type = "select",
name = L["Font"], name = L["Font"],
dialogControl = "LSM30_Font", dialogControl = "LSM30_Font",
values = AceGUIWidgetLSMlists.font, values = AceGUIWidgetLSMlists.font,
get = function(info) return E.private.general.chatBubbleFont; end, get = function(info) return E.private.general.chatBubbleFont end,
set = function(info, value) E.private.general.chatBubbleFont = value; E:StaticPopup_Show("PRIVATE_RL"); end, set = function(info, value) E.private.general.chatBubbleFont = value E:StaticPopup_Show("PRIVATE_RL") end,
disabled = function() return E.private.general.chatBubbles == "disabled"; end disabled = function() return E.private.general.chatBubbles == "disabled" end
}, },
fontSize = { fontSize = {
order = 5, order = 6,
type = "range", type = "range",
name = FONT_SIZE, name = FONT_SIZE,
get = function(info) return E.private.general.chatBubbleFontSize; end, get = function(info) return E.private.general.chatBubbleFontSize end,
set = function(info, value) E.private.general.chatBubbleFontSize = value; E:StaticPopup_Show("PRIVATE_RL"); end, set = function(info, value) E.private.general.chatBubbleFontSize = value E:StaticPopup_Show("PRIVATE_RL") end,
min = 4, max = 33, step = 1, min = 4, max = 33, step = 1,
disabled = function() return E.private.general.chatBubbles == "disabled"; end disabled = function() return E.private.general.chatBubbles == "disabled" end
}, },
fontOutline = { fontOutline = {
order = 6, order = 7,
type = "select", type = "select",
name = L["Font Outline"], name = L["Font Outline"],
get = function(info) return E.private.general.chatBubbleFontOutline end, get = function(info) return E.private.general.chatBubbleFontOutline end,
set = function(info, value) E.private.general.chatBubbleFontOutline = value; E:StaticPopup_Show("PRIVATE_RL"); end, set = function(info, value) E.private.general.chatBubbleFontOutline = value E:StaticPopup_Show("PRIVATE_RL") end,
disabled = function() return E.private.general.chatBubbles == "disabled" end, disabled = function() return E.private.general.chatBubbles == "disabled" end,
values = { values = {
["NONE"] = NONE, ["NONE"] = NONE,
@@ -682,8 +695,8 @@ E.Options.args.general = {
order = 10, order = 10,
type = "group", type = "group",
name = L["Watch Frame"], name = L["Watch Frame"],
get = function(info) return E.db.general[ info[getn(info)] ]; end, get = function(info) return E.db.general[ info[getn(info)] ] end,
set = function(info, value) E.db.general[ info[getn(info)] ] = value; end, set = function(info, value) E.db.general[ info[getn(info)] ] = value end,
args = { args = {
watchFrameHeader = { watchFrameHeader = {
order = 1, order = 1,
@@ -696,7 +709,7 @@ E.Options.args.general = {
name = L["Watch Frame Height"], name = L["Watch Frame Height"],
desc = L["Height of the watch tracker. Increase size to be able to see more objectives."], desc = L["Height of the watch tracker. Increase size to be able to see more objectives."],
min = 400, max = E.screenheight, step = 1, min = 400, max = E.screenheight, step = 1,
set = function(info, value) E.db.general[ info[getn(info)] ] = value; E:GetModule("Blizzard"):SetWatchFrameHeight(); end set = function(info, value) E.db.general[ info[getn(info)] ] = value E:GetModule("Blizzard"):SetWatchFrameHeight() end
} }
} }
}, },
@@ -714,8 +727,8 @@ E.Options.args.general = {
order = 41, order = 41,
type = "toggle", type = "toggle",
name = L["Enable"], name = L["Enable"],
get = function(info) return E.db.general.threat.enable; end, get = function(info) return E.db.general.threat.enable end,
set = function(info, value) E.db.general.threat.enable = value; E:GetModule("Threat"):ToggleEnable()end set = function(info, value) E.db.general.threat.enable = value E:GetModule("Threat"):ToggleEnable()end
}, },
threatPosition = { threatPosition = {
order = 42, order = 42,
@@ -726,18 +739,18 @@ E.Options.args.general = {
["LEFTCHAT"] = L["Left Chat"], ["LEFTCHAT"] = L["Left Chat"],
["RIGHTCHAT"] = L["Right Chat"] ["RIGHTCHAT"] = L["Right Chat"]
}, },
get = function(info) return E.db.general.threat.position; end, get = function(info) return E.db.general.threat.position end,
set = function(info, value) E.db.general.threat.position = value; E:GetModule("Threat"):UpdatePosition(); end set = function(info, value) E.db.general.threat.position = value E:GetModule("Threat"):UpdatePosition() end
}, },
threatTextSize = { threatTextSize = {
order = 43, order = 43,
name = FONT_SIZE, name = FONT_SIZE,
type = "range", type = "range",
min = 6, max = 22, step = 1, min = 6, max = 22, step = 1,
get = function(info) return E.db.general.threat.textSize; end, get = function(info) return E.db.general.threat.textSize end,
set = function(info, value) E.db.general.threat.textSize = value; E:GetModule("Threat"):UpdatePosition(); end set = function(info, value) E.db.general.threat.textSize = value E:GetModule("Threat"):UpdatePosition() end
} }
} }
}--]] }--]]
} }
}; }