Commit 0be0c0f3 authored by Azilroka's avatar Azilroka
Browse files

AB: Apply To All Group

parent d658f570
......@@ -504,6 +504,38 @@ function AB:UpdateBar1Paging()
end
end
function AB:ApplyFontToAll()
for i = 1, 10 do
for _, object in pairs({ 'hotkey', 'macro', 'count'}) do
E.db.actionbar['bar'..i][object..'Font'] = E.db.actionbar.font
E.db.actionbar['bar'..i][object..'FontOutline'] = E.db.actionbar.fontOutline
E.db.actionbar['bar'..i][object..'FontSize'] = E.db.actionbar.fontSize
end
end
for _, bar in pairs({ 'barPet', 'stanceBar', 'vehicleExitButton' }) do
for _, object in pairs({ 'hotkey', 'macro', 'count'}) do
E.db.actionbar[bar][object..'Font'] = E.db.actionbar.font
E.db.actionbar[bar][object..'FontOutline'] = E.db.actionbar.fontOutline
E.db.actionbar[bar][object..'FontSize'] = E.db.actionbar.fontSize
end
end
AB:UpdateButtonSettings()
end
function AB:ApplyTextOption(option, value)
for i = 1, 10 do
E.db.actionbar['bar'..i][option] = value
end
for _, bar in pairs({ 'barPet', 'stanceBar', 'vehicleExitButton' }) do
E.db.actionbar[bar][option] = value
end
AB:UpdateButtonSettings()
end
function AB:UpdateButtonSettings(specific)
if not E.private.actionbar.enable then return end
......
......@@ -1866,8 +1866,14 @@ P.actionbar = {
globalFadeAlpha = 0,
handleOverlay = true,
hideCooldownBling = false,
hotkeyTextPosition = 'TOPRIGHT',
hotkeyTextXOffset = 0,
hotkeyTextYOffset = -3,
keyDown = true,
lockActionBars = true,
macroTextPosition = 'TOPRIGHT',
macroTextXOffset = 0,
macroTextYOffset = -3,
movementModifier = 'SHIFT',
noPowerColor = { r = 0.5, g = 0.5, b = 1 },
noRangeColor = { r = 0.8, g = 0.1, b = 0.1 },
......@@ -1965,8 +1971,8 @@ for i = 1, 10 do
countFont = 'Homespun',
countFontOutline = 'MONOCHROMEOUTLINE',
countFontSize = 10,
countFontXOffset = 0,
countFontYOffset = 2,
countTextXOffset = 0,
countTextYOffset = 2,
counttext = true,
countTextPosition = 'BOTTOMRIGHT',
hotkeyColor = { r = 1, g = 1, b = 1 },
......@@ -1997,10 +2003,10 @@ for _, bar in pairs({ 'barPet', 'stanceBar', 'vehicleExitButton' }) do
P.actionbar[bar].countFont = 'Homespun'
P.actionbar[bar].countFontOutline = 'MONOCHROMEOUTLINE'
P.actionbar[bar].countFontSize = 10
P.actionbar[bar].countFontXOffset = 0
P.actionbar[bar].countFontYOffset = 2
P.actionbar[bar].counttext = true
P.actionbar[bar].countTextPosition = 'BOTTOMRIGHT'
P.actionbar[bar].countTextXOffset = 0
P.actionbar[bar].countTextYOffset = 2
P.actionbar[bar].useCountColor = false
end
......
......@@ -109,12 +109,33 @@ ActionBar.args.general.args.generalGroup.args.flashAnimation = ACH:Toggle(L["But
ActionBar.args.general.args.generalGroup.args.equippedItem = ACH:Toggle(L["Equipped Item Color"], nil, 11)
ActionBar.args.general.args.generalGroup.args.useRangeColorText = ACH:Toggle(L["Color Keybind Text"], L["Color Keybind Text when Out of Range, instead of the button."], 14)
ActionBar.args.general.args.fontGroup = ACH:Group(L["Font Group"], nil, 20)
ActionBar.args.general.args.fontGroup = ACH:Group(L["Font Group"], nil, 21)
ActionBar.args.general.args.fontGroup.inline = true
ActionBar.args.general.args.fontGroup.args.font = ACH:SharedMediaFont(L["Font"], nil, 1)
ActionBar.args.general.args.fontGroup.args.fontSize = ACH:Range(L["Font Size"], nil, 2, C.Values.FontSize)
ActionBar.args.general.args.fontGroup.args.fontOutline = ACH:FontFlags(L["Font Outline"], nil, 3)
ActionBar.args.general.args.fontGroup.args.applyFontToAll = ACH:Execute(L["Apply Font To All"], nil, 4, function() for i = 1, 10 do for _, object in pairs({ 'hotkey', 'macro', 'count'}) do E.db.actionbar['bar'..i][object..'Font'] = E.db.actionbar.font E.db.actionbar['bar'..i][object..'FontOutline'] = E.db.actionbar.fontOutline E.db.actionbar['bar'..i][object..'FontSize'] = E.db.actionbar.fontSize end end for _, bar in pairs({ 'barPet', 'stanceBar', 'vehicleExitButton' }) do for _, object in pairs({ 'hotkey', 'macro', 'count'}) do E.db.actionbar[bar][object..'Font'] = E.db.actionbar.font E.db.actionbar[bar][object..'FontOutline'] = E.db.actionbar.fontOutline E.db.actionbar[bar][object..'FontSize'] = E.db.actionbar.fontSize end end AB:UpdateButtonSettings() end)
ActionBar.args.general.args.fontGroup.args.applyFontToAll = ACH:Execute(L["Apply Font To All"], nil, 4, function() AB:ApplyFontToAll() end)
ActionBar.args.general.args.applyGroup = ACH:Group(L["Apply To All"], nil, 22)
ActionBar.args.general.args.applyGroup.inline = true
ActionBar.args.general.args.applyGroup.args.hotkeyTextGroup = ACH:Group(L["Keybind Text"], nil, 1, nil, function(info) return E.db.actionbar[info[#info]] end, function(info, value) E.db.actionbar[info[#info]] = value AB:ApplyTextOption(info[#info], value) end)
ActionBar.args.general.args.applyGroup.args.hotkeyTextGroup.inline = true
ActionBar.args.general.args.applyGroup.args.hotkeyTextGroup.args.hotkeyTextPosition = ACH:Select(L["Position"], nil, 4, textAnchors)
ActionBar.args.general.args.applyGroup.args.hotkeyTextGroup.args.hotkeyTextXOffset = ACH:Range(L["X-Offset"], nil, 5, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.applyGroup.args.hotkeyTextGroup.args.hotkeyTextYOffset = ACH:Range(L["Y-Offset"], nil, 6, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.applyGroup.args.countTextGroup = ACH:Group(L["Count Text"], nil, 2, nil, function(info) return E.db.actionbar[info[#info]] end, function(info, value) E.db.actionbar[info[#info]] = value AB:ApplyTextOption(info[#info], value) end)
ActionBar.args.general.args.applyGroup.args.countTextGroup.inline = true
ActionBar.args.general.args.applyGroup.args.countTextGroup.args.countTextPosition = ACH:Select(L["Position"], nil, 4, textAnchors)
ActionBar.args.general.args.applyGroup.args.countTextGroup.args.countTextXOffset = ACH:Range(L["X-Offset"], nil, 5, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.applyGroup.args.countTextGroup.args.countTextYOffset = ACH:Range(L["Y-Offset"], nil, 6, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.applyGroup.args.macroTextGroup = ACH:Group(L["Macro Text"], nil, 3, nil, function(info) return E.db.actionbar[info[#info]] end, function(info, value) E.db.actionbar[info[#info]] = value AB:ApplyTextOption(info[#info], value) end)
ActionBar.args.general.args.applyGroup.args.macroTextGroup.inline = true
ActionBar.args.general.args.applyGroup.args.macroTextGroup.args.macroTextPosition = ACH:Select(L["Position"], nil, 4, textAnchors)
ActionBar.args.general.args.applyGroup.args.macroTextGroup.args.macroTextXOffset = ACH:Range(L["X-Offset"], nil, 5, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.applyGroup.args.macroTextGroup.args.macroTextYOffset = ACH:Range(L["Y-Offset"], nil, 6, { min = -24, max = 24, step = 1 })
ActionBar.args.general.args.colorGroup = ACH:Group(L["COLORS"], nil, 30, nil, function(info) local t = E.db.actionbar[info[#info]] local d = P.actionbar[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a end, function(info, r, g, b, a) local t = E.db.actionbar[info[#info]] t.r, t.g, t.b, t.a = r, g, b, a AB:UpdateButtonSettings() end, function() return (E.Masque and E.private.actionbar.masque.actionbars) end)
ActionBar.args.general.args.colorGroup.inline = true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment