diff --git a/Modules/Arrow/QuestieArrow.lua b/Modules/Arrow/QuestieArrow.lua index 1e4856c..219d229 100644 --- a/Modules/Arrow/QuestieArrow.lua +++ b/Modules/Arrow/QuestieArrow.lua @@ -793,6 +793,14 @@ function QuestieArrow:ApplyAlpha() end end +function QuestieArrow:UpdateSettings() + EnsureArrowFrame() + if arrowFrame then + arrowFrame:SetScale(_GetArrowScale()) + arrowFrame:SetAlpha(_GetArrowAlpha()) + end +end + function QuestieArrow:Initialize() EnsureArrowFrame() diff --git a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua index 847b55f..99a4dec 100644 --- a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua +++ b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua @@ -56,9 +56,25 @@ function QuestieOptions.tabs.arrow:Initialize() get = function() return Questie.db.profile.arrowScale or 1 end, set = function(_, value) Questie.db.profile.arrowScale = value - -- Ensure frame exists first, then apply scale - if QuestieArrow and QuestieArrow.ApplyScale then - QuestieArrow.ApplyScale() + if QuestieArrow and QuestieArrow.UpdateSettings then + QuestieArrow:UpdateSettings() + end + end, + }, + arrow_alpha = { + type = "range", + order = 5, + width = 1.5, + name = function() return l10n("Arrow Transparency") end, + desc = function() return l10n("Change the transparency of the arrow") end, + min = 0.1, + max = 1.0, + step = 0.05, + get = function() return Questie.db.profile.arrowAlpha or 1.0 end, + set = function(_, value) + Questie.db.profile.arrowAlpha = value + if QuestieArrow and QuestieArrow.UpdateSettings then + QuestieArrow:UpdateSettings() end end, }, @@ -109,6 +125,7 @@ function QuestieOptions.tabs.arrow:Initialize() Questie.db.profile.arrowPosition = nil if QuestieArrow and QuestieArrow.ResetPosition then QuestieArrow:ResetPosition() + QuestieArrow:Refresh() end end, },