From f8e1acad008c0e440ce120ed5582e837c0a4170d Mon Sep 17 00:00:00 2001 From: Rdyx Date: Wed, 17 Apr 2024 19:56:06 +0200 Subject: [PATCH] Add blizz aura timer scaling option --- ShadowedUnitFrames.lua | 2 +- modules/auras.lua | 2 ++ options/config.lua | 34 ++++++++++++++++++++++------------ 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/ShadowedUnitFrames.lua b/ShadowedUnitFrames.lua index 8daa3d7b1..f788af547 100755 --- a/ShadowedUnitFrames.lua +++ b/ShadowedUnitFrames.lua @@ -33,7 +33,7 @@ function ShadowUF:OnInitialize() advanced = false, tooltipCombat = false, omnicc = false, - blizzardcc = true, + blizzardcc = {disabled = true, scale = 0.75}, tags = {}, units = {}, positions = {}, diff --git a/modules/auras.lua b/modules/auras.lua index ea90eaadc..5eac318c9 100755 --- a/modules/auras.lua +++ b/modules/auras.lua @@ -232,6 +232,8 @@ local function updateButton(id, group, config) button.cooldown:SetDrawEdge(false) button.cooldown:SetDrawSwipe(true) button.cooldown:SetSwipeColor(0, 0, 0, 0.8) + -- Scaling compared to aura frame + button.cooldown:SetScale(ShadowUF.db.profile.blizzardcc.scale) button.cooldown:Hide() button.stack = button:CreateFontString(nil, "OVERLAY") diff --git a/options/config.lua b/options/config.lua index 91eff5b14..a97462d5a 100755 --- a/options/config.lua +++ b/options/config.lua @@ -724,24 +724,34 @@ local function loadGeneralOptions() name = "", width = "full", }, - omnicc = { + blizzardcc = { order = 2.5, type = "toggle", - name = L["Disable OmniCC Cooldown Count"], + name = L["Disable Blizzard Cooldown Count"], desc = L["Disables showing Cooldown Count timers in all Shadowed Unit Frame auras."], - arg = "omnicc", + arg = "blizzardcc.disabled", width = "double", }, - blizzardcc = { - order = 2.5, + blizzardccScale = { + order = 3, + type = "range", + name = L["Blizzard Cooldown Count Scale"], + desc = L["Size of the Blizzard Cooldown Count based on the aura frame size (Require reload)."], + min = 0.35, max = 1, step = 0.05, + arg = "blizzardcc.scale", + disabled = function() return ShadowUF.db.profile.blizzardcc.disabled end, + hidden = hideAdvancedOption, + }, + omnicc = { + order = 3.5, type = "toggle", - name = L["Disable Blizzard Cooldown Count"], + name = L["Disable OmniCC Cooldown Count"], desc = L["Disables showing Cooldown Count timers in all Shadowed Unit Frame auras."], - arg = "blizzardcc", + arg = "omnicc", width = "double", }, hideCombat = { - order = 3, + order = 4, type = "toggle", name = L["Hide tooltips in combat"], desc = L["Prevents unit tooltips from showing while in combat."], @@ -749,13 +759,13 @@ local function loadGeneralOptions() width = "double", }, sep2 = { - order = 3.5, + order = 4.5, type = "description", name = "", width = "full", }, auraBorder = { - order = 5, + order = 6, type = "select", name = L["Aura border style"], desc = L["Style of borders to show for all auras."], @@ -763,7 +773,7 @@ local function loadGeneralOptions() arg = "auras.borderType", }, statusbar = { - order = 6, + order = 7, type = "select", name = L["Bar texture"], dialogControl = "LSM30_Statusbar", @@ -771,7 +781,7 @@ local function loadGeneralOptions() arg = "bars.texture", }, spacing = { - order = 7, + order = 8, type = "range", name = L["Bar spacing"], desc = L["How much spacing should be provided between all of the bars inside a unit frame, negative values move them farther apart, positive values bring them closer together. 0 for no spacing."],