Commit 7368352c authored by Simpy's avatar Simpy 🐹

12.10

parents 32b03ae9 57966615
## Interface: 90001
## Author: Elv, Simpy
## Version: 12.09
## Version: 12.10
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -306,7 +306,7 @@ function AB:PositionAndSizeBar(barName)
button.handleBackdrop = nil
else
button:Show()
button.handleBackdrop = true
button.handleBackdrop = true -- keep over HandleButton
lastShownButton = button
end
......
......@@ -152,8 +152,8 @@ function AB:UpdateMicroPositionDimensions()
anchorRowButton = button
end
button.handleBackdrop = true -- keep over HandleButton
AB:HandleButton(microBar, button, i, lastButton, lastColumnButton)
button.handleBackdrop = true
lastButton = button
end
......
......@@ -139,9 +139,6 @@ function AB:PositionAndSizeBarPet()
bar.buttons[i] = button
AB:HandleButton(bar, button, i, lastButton, lastColumnButton)
autoCast:SetOutside(button, autoCastWidth, autoCastHeight)
if i == 1 or i == buttonsPerRow then
anchorRowButton = button
end
......@@ -154,9 +151,11 @@ function AB:PositionAndSizeBarPet()
button:SetScale(1)
button:SetAlpha(bar.db.alpha)
lastShownButton = button
button.handleBackdrop = true
button.handleBackdrop = true -- keep over HandleButton
end
autoCast:SetOutside(button, autoCastWidth, autoCastHeight)
AB:HandleButton(bar, button, i, lastButton, lastColumnButton)
AB:StyleButton(button, nil, MasqueGroup and E.private.actionbar.masque.petBar)
end
......
......@@ -151,7 +151,7 @@ function AB:PositionAndSizeBarShapeShift()
else
button:SetAlpha(db.alpha)
lastShownButton = button
button.handleBackdrop = true
button.handleBackdrop = true -- keep over HandleButton
end
AB:HandleButton(bar, button, i, lastButton, lastColumnButton)
......
......@@ -89,9 +89,10 @@ function A:MasqueData(texture, highlight)
end
function A:UpdateStatusBar(button)
local db = A.db[button.auraType]
button.statusBar:SetValue(button.timeLeft)
local threshold = A.db.fadeThreshold
local threshold = db.fadeThreshold
if threshold == -1 then
return
elseif button.timeLeft > threshold then
......@@ -113,12 +114,8 @@ function A:CreateIcon(button)
button.texture:SetTexCoord(unpack(E.TexCoords))
button.count = button:CreateFontString(nil, 'OVERLAY')
button.count:SetFontObject('NumberFontNormal')
button.count:SetText('\10')
button.text = button:CreateFontString(nil, 'OVERLAY')
button.text:SetFontObject('NumberFontNormal')
button.text:SetText('\10')
button.highlight = button:CreateTexture(nil, 'HIGHLIGHT')
button.highlight:SetColorTexture(1, 1, 1, .45)
......@@ -161,25 +158,24 @@ function A:CreateIcon(button)
end
function A:UpdateIcon(button)
local font = LSM:Fetch('font', A.db.font)
local db = A.db[button.auraType]
button.count:ClearAllPoints()
button.count:Point('BOTTOMRIGHT', -1 + A.db.countXOffset, 1 + A.db.countYOffset)
button.count:FontTemplate(font, db.countFontSize, A.db.fontOutline)
button.count:Point('BOTTOMRIGHT', db.countXOffset, db.countYOffset)
button.count:FontTemplate(LSM:Fetch('font', db.countFont), db.countFontSize, db.fontOutline)
button.text:ClearAllPoints()
button.text:Point('TOP', button, 'BOTTOM', 1 + A.db.timeXOffset, 0 + A.db.timeYOffset)
button.text:FontTemplate(font, db.durationFontSize, A.db.fontOutline)
button.text:Point('TOP', button, 'BOTTOM', db.timeXOffset, db.timeYOffset)
button.text:FontTemplate(LSM:Fetch('font', db.timeFont), db.timeFontSize, db.timeFontOutline)
local pos, spacing, iconSize = A.db.barPosition, A.db.barSpacing, db.size - (E.Border * 2)
local pos, spacing, iconSize = db.barPosition, db.barSpacing, db.size - (E.Border * 2)
local isOnTop, isOnBottom, isOnLeft = pos == 'TOP', pos == 'BOTTOM', pos == 'LEFT'
local isHorizontal = isOnTop or isOnBottom
button.statusBar:ClearAllPoints()
button.statusBar:Size(isHorizontal and iconSize or (A.db.barWidth + (E.PixelMode and 0 or 2)), isHorizontal and (A.db.barHeight + (E.PixelMode and 0 or 2)) or iconSize)
button.statusBar:Size(isHorizontal and iconSize or (db.barSize + (E.PixelMode and 0 or 2)), isHorizontal and (db.barSize + (E.PixelMode and 0 or 2)) or iconSize)
button.statusBar:Point(E.InversePoints[pos], button, pos, isHorizontal and 0 or ((isOnLeft and -((E.PixelMode and 1 or 3) + spacing)) or ((E.PixelMode and 1 or 3) + spacing)), not isHorizontal and 0 or ((isOnTop and ((E.PixelMode and 1 or 3) + spacing) or -((E.PixelMode and 1 or 3) + spacing))))
button.statusBar:SetStatusBarTexture(LSM:Fetch('statusbar', A.db.barTexture))
button.statusBar:SetStatusBarTexture(LSM:Fetch('statusbar', db.barTexture))
button.statusBar:SetOrientation(isHorizontal and 'HORIZONTAL' or 'VERTICAL')
button.statusBar:SetRotatesTexture(not isHorizontal)
end
......@@ -223,20 +219,21 @@ function A:UpdateAura(button, index)
local DebuffType = dtype or 'none'
if name then
local db = A.db[button.auraType]
if duration > 0 and expiration then
A:SetAuraTime(button, expiration, duration)
else
A:ClearAuraTime(button)
end
local r, g, b = A.db.barColor.r, A.db.barColor.g, A.db.barColor.b
if button.timeLeft and A.db.barColorGradient then
local r, g, b = db.barColor.r, db.barColor.g, db.barColor.b
if button.timeLeft and db.barColorGradient then
r, g, b = E.oUF:ColorGradient(button.timeLeft, duration or 0, .8, 0, 0, .8, .8, 0, 0, .8, 0)
end
button.count:SetText(count > 1 and count)
button.text:SetShown(A.db.showDuration)
button.statusBar:SetShown((A.db.barShow and duration > 0) or (A.db.barShow and A.db.barNoDuration and duration == 0))
button.text:SetShown(db.showDuration)
button.statusBar:SetShown((db.barShow and duration > 0) or (db.barShow and db.barNoDuration and duration == 0))
button.statusBar:SetStatusBarColor(r, g, b)
button.texture:SetTexture(texture)
......@@ -252,6 +249,7 @@ end
function A:UpdateTempEnchant(button, index)
local offset = (strmatch(button:GetName(), '2$') and 6) or 2
local db = A.db[button.auraType]
local duration, remaining = 600, 0
local expiration = select(offset, GetWeaponEnchantInfo())
......@@ -277,13 +275,13 @@ function A:UpdateTempEnchant(button, index)
A:ClearAuraTime(button)
end
local r, g, b = A.db.barColor.r, A.db.barColor.g, A.db.barColor.b
if expiration and A.db.barColorGradient then
local r, g, b = db.barColor.r, db.barColor.g, db.barColor.b
if expiration and db.barColorGradient then
r, g, b = E.oUF:ColorGradient(remaining, duration, .8, 0, 0, .8, .8, 0, 0, .8, 0)
end
button.text:SetShown(A.db.showDuration)
button.statusBar:SetShown((A.db.barShow and remaining > 0) or (A.db.barShow and A.db.barNoDuration and not expiration))
button.text:SetShown(db.showDuration)
button.statusBar:SetShown((db.barShow and remaining > 0) or (db.barShow and db.barNoDuration and not expiration))
button.statusBar:SetStatusBarColor(r, g, b)
end
......@@ -307,6 +305,12 @@ function A:UpdateHeader(header)
local db = A.db[header.auraType]
local template = format('ElvUIAuraTemplate%d', db.size)
local colors = db.barColor
if E:CheckClassColor(colors.r, colors.g, colors.b) then
local classColor = E:ClassColor(E.myclass, true)
colors.r, colors.g, colors.b = classColor.r, classColor.g, classColor.b
end
if header.filter == 'HELPFUL' then
header:SetAttribute('consolidateTo', 0)
header:SetAttribute('weaponTemplate', template)
......@@ -339,8 +343,9 @@ function A:UpdateHeader(header)
local index = 1
local child = select(index, header:GetChildren())
while child do
child:Size(db.size, db.size)
child.db = db
child.auraType = header.auraType -- used to update cooldown text
child:Size(db.size, db.size)
A:UpdateIcon(child)
......@@ -391,12 +396,6 @@ function A:Initialize()
A.Initialized = true
A.db = E.db.auras
local colors = A.db.barColor
if E:CheckClassColor(colors.r, colors.g, colors.b) then
local classColor = E:ClassColor(E.myclass, true)
colors.r, colors.g, colors.b = classColor.r, classColor.g, classColor.b
end
if E.private.auras.buffsHeader then
A.BuffFrame = A:CreateAuraHeader('HELPFUL')
A.BuffFrame:Point('TOPRIGHT', _G.MMHolder or _G.Minimap, 'TOPLEFT', -(6 + E.Border), -E.Border - E.Spacing)
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local LSM = E.Libs.LSM
local unpack, tonumber, abs = unpack, tonumber, abs
......@@ -43,13 +44,11 @@ function UF:Construct_Castbar(frame, moverName)
castbar:CreateBackdrop(nil, nil, nil, nil, true)
castbar.Time = castbar:CreateFontString(nil, 'OVERLAY')
UF:Configure_FontString(castbar.Time)
castbar.Time:Point('RIGHT', castbar, 'RIGHT', -4, 0)
castbar.Time:SetTextColor(0.84, 0.75, 0.65)
castbar.Time:SetJustifyH('RIGHT')
castbar.Text = castbar:CreateFontString(nil, 'OVERLAY')
UF:Configure_FontString(castbar.Text)
castbar.Text:Point('LEFT', castbar, 'LEFT', 4, 0)
castbar.Text:Point('RIGHT', castbar.Time, 'LEFT', -4, 0)
castbar.Text:SetTextColor(0.84, 0.75, 0.65)
......@@ -130,6 +129,21 @@ function UF:Configure_Castbar(frame)
castbar.LatencyTexture:Hide()
end
--Font Options
local customFont = db.customTextFont
if customFont.enable then
castbar.Text:FontTemplate(LSM:Fetch('font', customFont.font), customFont.fontSize, customFont.fontStyle)
else
UF:Update_FontString(castbar.Text)
end
customFont = db.customTimeFont
if customFont.enable then
castbar.Time:FontTemplate(LSM:Fetch('font', customFont.font), customFont.fontSize, customFont.fontStyle)
else
UF:Update_FontString(castbar.Time)
end
local textColor = db.textColor
castbar.Text:SetTextColor(textColor.r, textColor.g, textColor.b)
castbar.Time:SetTextColor(textColor.r, textColor.g, textColor.b)
......
......@@ -792,53 +792,46 @@ P.nameplates.units.ENEMY_NPC.level.format = '[difficultycolor][level][shortclass
P.nameplates.units.ENEMY_NPC.title.format = '[npctitle]'
P.nameplates.units.ENEMY_NPC.name.format = '[name]'
--Auras
P.auras = {
font = 'Homespun',
fontOutline = 'MONOCHROMEOUTLINE',
countYOffset = 0,
local TopAuras = {
barColor = { r = 0, g = .8, b = 0 },
barColorGradient = false,
barSize = 2,
barNoDuration = true,
barPosition = 'BOTTOM',
barShow = false,
barSpacing = 2,
barTexture = 'ElvUI Norm',
countFont = 'Homespun',
countFontOutline = 'MONOCHROMEOUTLINE',
countFontSize = 10,
countXOffset = 0,
timeYOffset = 0,
countYOffset = 0,
timeFont = 'Homespun',
timeFontOutline = 'MONOCHROMEOUTLINE',
timeFontSize = 10,
timeXOffset = 0,
timeYOffset = 0,
fadeThreshold = 6,
growthDirection = 'LEFT_DOWN',
horizontalSpacing = 6,
maxWraps = 3,
seperateOwn = 1,
showDuration = true,
barShow = false,
barTexture = 'ElvUI Norm',
barPosition = 'BOTTOM',
barWidth = 2,
barHeight = 2,
barSpacing = 2,
barColor = { r = 0, g = .8, b = 0 },
barColorGradient = false,
barNoDuration = true,
buffs = {
growthDirection = 'LEFT_DOWN',
wrapAfter = 12,
maxWraps = 3,
horizontalSpacing = 6,
verticalSpacing = 16,
sortMethod = 'TIME',
sortDir = '-',
seperateOwn = 1,
size = 32,
countFontSize = 10,
durationFontSize = 10,
},
debuffs = {
growthDirection = 'LEFT_DOWN',
wrapAfter = 12,
maxWraps = 1,
horizontalSpacing = 6,
verticalSpacing = 16,
sortMethod = 'TIME',
sortDir = '-',
seperateOwn = 1,
size = 32,
countFontSize = 10,
durationFontSize = 10,
},
size = 32,
sortDir = '-',
sortMethod = 'TIME',
verticalSpacing = 16,
wrapAfter = 12,
}
--Auras
P.auras = {
buffs = CopyTable(TopAuras),
debuffs = CopyTable(TopAuras),
}
P.auras.debuffs.maxWraps = 1
--Chat
P.chat = {
url = true,
......@@ -1068,6 +1061,18 @@ local UF_AuraWatch = {
}
local UF_Castbar = {
customTextFont = {
enable = false,
font = 'PT Sans Narrow',
fontSize = 12,
fontStyle = 'OUTLINE'
},
customTimeFont = {
enable = false,
font = 'PT Sans Narrow',
fontSize = 12,
fontStyle = 'OUTLINE'
},
displayTarget = false,
enable = true,
format = 'REMAINING',
......
......@@ -3,10 +3,18 @@ local C, L = unpack(select(2, ...))
local A = E:GetModule('Auras')
local ACH = E.Libs.ACH
E.Options.args.auras = ACH:Group(L["BUFFOPTIONS_LABEL"], nil, 2, 'tab', function(info) return E.private.auras[info[#info]] end, function(info, value) E.private.auras[info[#info]] = value; E:StaticPopup_Show('PRIVATE_RL') end)
E.Options.args.auras.args.intro = ACH:Description(L["AURAS_DESC"], 0)
E.Options.args.auras.args.enable = ACH:Toggle(L["Enable"], nil, 1)
E.Options.args.auras.args.disableBlizzard = ACH:Toggle(L["Disabled Blizzard"], nil, 2)
E.Options.args.auras.args.buffsHeader = ACH:Toggle(L["Buffs"], nil, 3)
E.Options.args.auras.args.debuffsHeader = ACH:Toggle(L["Debuffs"], nil, 4)
E.Options.args.auras.args.masque = ACH:MultiSelect(L["Masque Support"], nil, 10, { buffs = L["Buffs"], debuffs = L["Debuffs"] }, nil, nil, function(_, key) return E.private.auras.masque[key] end, function(_, key, value) E.private.auras.masque[key] = value; E:StaticPopup_Show('PRIVATE_RL') end, function() return not E.Masque or not E.private.auras.enable end)
local SharedOptions = {
size = ACH:Range(L["Size"], L["Set the size of the individual auras."], 1, { min = 16, max = 60, step = 2 }),
durationFontSize = ACH:Range(L["Duration Font Size"], nil, 2, C.Values.FontSize),
countFontSize = ACH:Range(L["Count Font Size"], nil, 3, C.Values.FontSize),
general = ACH:Group(L["General"], nil, 1, nil),
size = ACH:Range(L["Size"], L["Set the size of the individual auras."], 2, { min = 16, max = 60, step = 2 }),
growthDirection = ACH:Select(L["Growth Direction"], L["The direction the auras will grow and then the direction they will grow after they reach the wrap after limit."], 4, C.Values.GrowthDirection),
wrapAfter = ACH:Range(L["Wrap After"], L["Begin a new row or column after this many auras."], 5, { min = 1, max = 32, step = 1 }),
maxWraps = ACH:Range(L["Max Wraps"], L["Limit the number of rows or columns."], 6, { min = 1, max = 32, step = 1 }),
......@@ -14,42 +22,55 @@ local SharedOptions = {
verticalSpacing = ACH:Range(L["Vertical Spacing"], nil, 8, { min = 0, max = 50, step = 1 }),
sortMethod = ACH:Select(L["Sort Method"], L["Defines how the group is sorted."], 9, { INDEX = L["Index"], TIME = L["Time"], NAME = L["Name"] }),
sortDir = ACH:Select(L["Sort Direction"], L["Defines the sort order of the selected sort method."], 10, { ['+'] = L["Ascending"], ['-'] = L["Descending"] }),
seperateOwn = ACH:Select(L["Seperate"], L["Indicate whether buffs you cast yourself should be separated before or after."], 11, { [-1] = L["Other's First"], [0] = L["No Sorting"], [1] = L["Your Auras First"] })
seperateOwn = ACH:Select(L["Seperate"], L["Indicate whether buffs you cast yourself should be separated before or after."], 11, { [-1] = L["Other's First"], [0] = L["No Sorting"], [1] = L["Your Auras First"] }),
statusBar = ACH:Group(L["Statusbar"], nil, -3),
timeGroup = ACH:Group(L['Time'], nil, -2),
countGroup = ACH:Group(L['Count'], nil, -1),
}
E.Options.args.auras = ACH:Group(L["BUFFOPTIONS_LABEL"], nil, 2, 'tab', function(info) return E.private.auras[info[#info]] end, function(info, value) E.private.auras[info[#info]] = value; E:StaticPopup_Show('PRIVATE_RL') end)
E.Options.args.auras.args.intro = ACH:Description(L["AURAS_DESC"], 0)
E.Options.args.auras.args.enable = ACH:Toggle(L["Enable"], nil, 1)
E.Options.args.auras.args.disableBlizzard = ACH:Toggle(L["Disabled Blizzard"], nil, 2)
E.Options.args.auras.args.buffsHeader = ACH:Toggle(L["Buffs"], nil, 3)
E.Options.args.auras.args.debuffsHeader = ACH:Toggle(L["Debuffs"], nil, 4)
SharedOptions.general.inline = true
SharedOptions.general.args.fadeThreshold = ACH:Range(L["Fade Threshold"], L["Threshold before the icon will fade out and back in. Set to -1 to disable."], 1, { min = -1, max = 30, step = 1 })
SharedOptions.general.args.showDuration = ACH:Toggle(L["Duration Enable"], nil, 3)
SharedOptions.timeGroup.inline = true
SharedOptions.timeGroup.args.timeFont = ACH:SharedMediaFont(L["Font"], nil, 1)
SharedOptions.timeGroup.args.timeFontOutline = ACH:FontFlags(L["Font Outline"], L["Set the font outline."], 2)
SharedOptions.timeGroup.args.timeFontSize = ACH:Range(L["Font Size"], nil, 3, C.Values.FontSize)
SharedOptions.timeGroup.args.timeXOffset = ACH:Range(L["X-Offset"], nil, 4, { min = -60, max = 60, step = 1 })
SharedOptions.timeGroup.args.timeYOffset = ACH:Range(L["Y-Offset"], nil, 5, { min = -60, max = 60, step = 1 })
SharedOptions.countGroup.inline = true
SharedOptions.countGroup.args.countFont = ACH:SharedMediaFont(L["Font"], nil, 1)
SharedOptions.countGroup.args.countFontOutline = ACH:FontFlags(L["Font Outline"], L["Set the font outline."], 2)
SharedOptions.countGroup.args.countFontSize = ACH:Range(L["Font Size"], nil, 3, C.Values.FontSize)
SharedOptions.countGroup.args.countXOffset = ACH:Range(L["X-Offset"], nil, 4, { min = -60, max = 60, step = 1 })
SharedOptions.countGroup.args.countYOffset = ACH:Range(L["Y-Offset"], nil, 5, { min = -60, max = 60, step = 1 })
E.Options.args.auras.args.general = ACH:Group(L["General"], nil, 1, nil, function(info) return E.db.auras[info[#info]] end, function(info, value) E.db.auras[info[#info]] = value; A:UpdateHeader(A.BuffFrame); A:UpdateHeader(A.DebuffFrame) end)
E.Options.args.auras.args.general.args.fadeThreshold = ACH:Range(L["Fade Threshold"], L["Threshold before the icon will fade out and back in. Set to -1 to disable."], 1, { min = -1, max = 30, step = 1 })
E.Options.args.auras.args.general.args.font = ACH:SharedMediaFont(L["Font"], nil, 2)
E.Options.args.auras.args.general.args.showDuration = ACH:Toggle(L["Duration Enable"], nil, 3)
E.Options.args.auras.args.general.args.fontOutline = ACH:Select(L["Font Outline"], L["Set the font outline."], 4, C.Values.FontFlags)
E.Options.args.auras.args.general.args.timeXOffset = ACH:Range(L["Time xOffset"], nil, 5, { min = -60, max = 60, step = 1 })
E.Options.args.auras.args.general.args.timeYOffset = ACH:Range(L["Time yOffset"], nil, 6, { min = -60, max = 60, step = 1 })
E.Options.args.auras.args.general.args.countXOffset = ACH:Range(L["Count xOffset"], nil, 7, { min = -60, max = 60, step = 1 })
E.Options.args.auras.args.general.args.countYOffset = ACH:Range(L["Count yOffset"], nil, 8, { min = -60, max = 60, step = 1 })
E.Options.args.auras.args.general.args.statusBar = ACH:Group(L["Statusbar"], nil, 9, nil, nil, nil, function() return not E.db.auras.barShow end)
E.Options.args.auras.args.general.args.statusBar.inline = true
E.Options.args.auras.args.general.args.statusBar.args.barShow = ACH:Toggle(L["Enable"], nil, 1, nil, nil, nil, nil, nil, false)
E.Options.args.auras.args.general.args.statusBar.args.barNoDuration = ACH:Toggle(L["No Duration"], nil, 2)
E.Options.args.auras.args.general.args.statusBar.args.barTexture = ACH:SharedMediaStatusbar(L["Texture"], nil, 3)
E.Options.args.auras.args.general.args.statusBar.args.barColor = ACH:Color(L.COLOR, nil, 4, true, nil, function() local t = E.db.auras.barColor local d = P.auras.barColor return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end, function(_, r, g, b) local t = E.db.auras.barColor t.r, t.g, t.b = r, g, b end, function() return not E.db.auras.barShow or (E.db.auras.barColorGradient or not E.db.auras.barShow) end)
E.Options.args.auras.args.general.args.statusBar.args.barColorGradient = ACH:Toggle(L["Color by Value"], nil, 5)
E.Options.args.auras.args.general.args.statusBar.args.barPosition = ACH:Select(L["Position"], nil, 6, { TOP = L["Top"], BOTTOM = L["Bottom"], LEFT = L["Left"], RIGHT = L["Right"] })
E.Options.args.auras.args.general.args.statusBar.args.barWidth = ACH:Range(L["Width"], nil, 7, { min = 1, max = 10, step = 1 }, nil, nil, nil, nil, function() return E.db.auras.barPosition == 'TOP' or E.db.auras.barPosition == 'BOTTOM' end)
E.Options.args.auras.args.general.args.statusBar.args.barHeight = ACH:Range(L["Height"], nil, 7, { min = 1, max = 10, step = 1 }, nil, nil, nil, nil, function() return E.db.auras.barPosition == 'LEFT' or E.db.auras.barPosition == 'RIGHT' end)
E.Options.args.auras.args.general.args.statusBar.args.barSpacing = ACH:Range(L["Spacing"], nil, 8, { min = -10, max = 10, step = 1 })
E.Options.args.auras.args.general.args.masque = ACH:MultiSelect(L["Masque Support"], nil, 10, { buffs = L["Buffs"], debuffs = L["Debuffs"] }, nil, nil, function(_, key) return E.private.auras.masque[key] end, function(_, key, value) E.private.auras.masque[key] = value; E:StaticPopup_Show('PRIVATE_RL') end, function() return not E.Masque or not E.private.auras.enable end)
SharedOptions.statusBar.inline = true
SharedOptions.statusBar.args.barShow = ACH:Toggle(L["Enable"], nil, 1, nil, nil, nil, nil, nil, false)
SharedOptions.statusBar.args.barNoDuration = ACH:Toggle(L["No Duration"], nil, 2)
SharedOptions.statusBar.args.barTexture = ACH:SharedMediaStatusbar(L["Texture"], nil, 3)
SharedOptions.statusBar.args.barColor = ACH:Color(L.COLOR, nil, 4, true)
SharedOptions.statusBar.args.barColorGradient = ACH:Toggle(L["Color by Value"], nil, 5)
SharedOptions.statusBar.args.barPosition = ACH:Select(L["Position"], nil, 6, { TOP = L["Top"], BOTTOM = L["Bottom"], LEFT = L["Left"], RIGHT = L["Right"] })
SharedOptions.statusBar.args.barSize = ACH:Range(L["Size"], nil, 7, { min = 1, max = 10, step = 1 })
SharedOptions.statusBar.args.barSpacing = ACH:Range(L["Spacing"], nil, 8, { min = -10, max = 10, step = 1 })
E.Options.args.auras.args.buffs = ACH:Group(L["Buffs"], nil, 2, nil, function(info) return E.db.auras.buffs[info[#info]] end, function(info, value) E.db.auras.buffs[info[#info]] = value; A:UpdateHeader(A.BuffFrame) end, function() return not E.private.auras.buffsHeader end)
E.Options.args.auras.args.buffs.args = CopyTable(SharedOptions)
E.Options.args.auras.args.buffs.args.general.get = function(info) return E.db.auras.buffs[info[#info]] end
E.Options.args.auras.args.buffs.args.general.set = function(info, value) E.db.auras.buffs[info[#info]] = value; A:UpdateHeader(A.BuffFrame) end
E.Options.args.auras.args.buffs.args.statusBar.disabled = function() return not E.db.auras.buffs.barShow end
E.Options.args.auras.args.buffs.args.statusBar.args.barColor.get = function() local t = E.db.auras.buffs.barColor local d = P.auras.buffs.barColor return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end
E.Options.args.auras.args.buffs.args.statusBar.args.barColor.set = function(_, r, g, b) local t = E.db.auras.buffs.barColor t.r, t.g, t.b = r, g, b end
E.Options.args.auras.args.buffs.args.statusBar.args.barColor.disabled = function() return not E.db.auras.buffs.barShow or (E.db.auras.buffs.barColorGradient or not E.db.auras.buffs.barShow) end
E.Options.args.auras.args.debuffs = ACH:Group(L["Debuffs"], nil, 3, nil, function(info) return E.db.auras.debuffs[info[#info]] end, function(info, value) E.db.auras.debuffs[info[#info]] = value; A:UpdateHeader(A.DebuffFrame) end, function() return not E.private.auras.debuffsHeader end)
E.Options.args.auras.args.debuffs.args = CopyTable(SharedOptions)
E.Options.args.auras.args.debuffs.args.general.get = function(info) return E.db.auras.debuffs[info[#info]] end
E.Options.args.auras.args.debuffs.args.general.set = function(info, value) E.db.auras.debuffs[info[#info]] = value; A:UpdateHeader(A.DebuffFrame) end
E.Options.args.auras.args.debuffs.args.statusBar.disabled = function() return not E.db.auras.debuffs.barShow end
E.Options.args.auras.args.debuffs.args.statusBar.args.barColor.get = function() local t = E.db.auras.debuffs.barColor local d = P.auras.debuffs.barColor return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end
E.Options.args.auras.args.debuffs.args.statusBar.args.barColor.set = function(_, r, g, b) local t = E.db.auras.debuffs.barColor t.r, t.g, t.b = r, g, b end
E.Options.args.auras.args.debuffs.args.statusBar.args.barColor.disabled = function() return not E.db.auras.debuffs.barShow or (E.db.auras.debuffs.barColorGradient or not E.db.auras.debuffs.barShow) end
......@@ -1034,14 +1034,49 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
get = function(info) return E.db.unitframe.units[groupName].castbar[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
args = {
xOffsetText = {
enable = {
order = 1,
type = 'toggle',
name = L["Custom Font"],
get = function(info) return E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
},
font = {
order = 2,
type = 'select',
dialogControl = 'LSM30_Font',
name = L["Font"],
values = _G.AceGUIWidgetLSMlists.font,
get = function(info) return E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
disabled = function() return not E.db.unitframe.units[groupName].castbar.customTextFont.enable end
},
fontSize = {
order = 3,
type = 'range',
name = L["Font Size"],
min = 7, max = 212, step = 1,
get = function(info) return E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
disabled = function() return not E.db.unitframe.units[groupName].castbar.customTextFont.enable end
},
fontStyle = {
order = 4,
type = 'select',
name = L["Font Outline"],
values = C.Values.FontFlags,
get = function(info) return E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTextFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
disabled = function() return not E.db.unitframe.units[groupName].castbar.customTextFont.enable end
},
xOffsetText = {
order = 4,
type = 'range',
name = L["X-Offset"],
min = -100, max = 100, step = 1,
},
yOffsetText = {
order = 2,
order = 5,
type = 'range',
name = L["Y-Offset"],
min = -50, max = 50, step = 1,
......@@ -1056,14 +1091,49 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
get = function(info) return E.db.unitframe.units[groupName].castbar[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
args = {
xOffsetTime = {
enable = {
order = 1,
type = 'toggle',
name = L["Custom Font"],
get = function(info) return E.db.unitframe.units[groupName].castbar.customTimeFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTimeFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
},
font = {
order = 2,
type = 'select',
dialogControl = 'LSM30_Font',
name = L["Font"],
values = _G.AceGUIWidgetLSMlists.font,
get = function(info) return E.db.unitframe.units[groupName].castbar.customTimeFont[info[#info]] end,
set = function(info, value) E.db.unitframe.units[groupName].castbar.customTimeFont[info[#info]] = value; updateFunc(UF, groupName, numUnits) end,
disabled = function() return not E.db.unitframe.units[groupName].castbar.customTimeFont.enable end
},
fontSize = {
order = 3,