Fix saving window position
Sasky [03-24-15 - 06:08]
Fix saving window position
diff --git a/CyrHUD.lua b/CyrHUD.lua
index f68c496..915ddfe 100644
--- a/CyrHUD.lua
+++ b/CyrHUD.lua
@@ -75,7 +75,8 @@ function CyrHUD.eventAttackChange(_, keepID, battlegroundContext, underAttack)
end
function CyrHUD.saveWindowPosition( window )
- _, _, _, _, x, y = window:GetAnchor()
+ local _, _, _, aP, x, y = window:GetAnchor()
+ CyrHUD.cfg.anchPoint = aP
CyrHUD.cfg.xoff = x
CyrHUD.cfg.yoff = y
end
@@ -158,7 +159,7 @@ CyrHUD.visible = false
function CyrHUD:init()
local _, pt, relTo, relPt = CyrHUD_UI:GetAnchor()
CyrHUD_UI:ClearAnchors()
- CyrHUD_UI:SetAnchor(pt, relTo, relPt, CyrHUD.cfg.xoff, CyrHUD.cfg.yoff)
+ CyrHUD_UI:SetAnchor(pt, relTo, CyrHUD.cfg.anchPoint or relPt, CyrHUD.cfg.xoff, CyrHUD.cfg.yoff)
--Init UI
self:disableQuestTrackers()