fix: Apply scale and alpha immediately via dedicated functions
This commit is contained in:
@@ -770,7 +770,8 @@ end
|
|||||||
|
|
||||||
function QuestieArrow:ResetPosition()
|
function QuestieArrow:ResetPosition()
|
||||||
Questie.db.profile.arrowPosition = nil
|
Questie.db.profile.arrowPosition = nil
|
||||||
-- Reset to default center position
|
-- Ensure frame exists, then reset to default center position
|
||||||
|
EnsureArrowFrame()
|
||||||
if arrowFrame then
|
if arrowFrame then
|
||||||
arrowFrame:ClearAllPoints()
|
arrowFrame:ClearAllPoints()
|
||||||
arrowFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -100)
|
arrowFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -100)
|
||||||
@@ -778,6 +779,20 @@ function QuestieArrow:ResetPosition()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function QuestieArrow:ApplyScale()
|
||||||
|
EnsureArrowFrame()
|
||||||
|
if arrowFrame then
|
||||||
|
arrowFrame:SetScale(_GetArrowScale())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function QuestieArrow:ApplyAlpha()
|
||||||
|
EnsureArrowFrame()
|
||||||
|
if arrowFrame then
|
||||||
|
arrowFrame:SetAlpha(_GetArrowAlpha())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function QuestieArrow:Initialize()
|
function QuestieArrow:Initialize()
|
||||||
EnsureArrowFrame()
|
EnsureArrowFrame()
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ function QuestieOptions.tabs.arrow:Initialize()
|
|||||||
get = function() return Questie.db.profile.arrowScale or 1 end,
|
get = function() return Questie.db.profile.arrowScale or 1 end,
|
||||||
set = function(_, value)
|
set = function(_, value)
|
||||||
Questie.db.profile.arrowScale = value
|
Questie.db.profile.arrowScale = value
|
||||||
if QuestieArrow and QuestieArrow.Refresh then
|
if QuestieArrow and QuestieArrow.ApplyScale then
|
||||||
QuestieArrow:Refresh()
|
QuestieArrow:ApplyScale()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -73,8 +73,8 @@ function QuestieOptions.tabs.arrow:Initialize()
|
|||||||
get = function() return Questie.db.profile.arrowAlpha or 1.0 end,
|
get = function() return Questie.db.profile.arrowAlpha or 1.0 end,
|
||||||
set = function(_, value)
|
set = function(_, value)
|
||||||
Questie.db.profile.arrowAlpha = value
|
Questie.db.profile.arrowAlpha = value
|
||||||
if QuestieArrow and QuestieArrow.Refresh then
|
if QuestieArrow and QuestieArrow.ApplyAlpha then
|
||||||
QuestieArrow:Refresh()
|
QuestieArrow:ApplyAlpha()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user