anchoring for modules rewritten

This commit is contained in:
Sumsebrum
2021-05-18 16:39:43 +02:00
parent eaf8129143
commit 2db3db21ec
5 changed files with 301 additions and 473 deletions

View File

@ -284,4 +284,18 @@ function Gladdy:CreateButton(i)
for k, v in self:IterModules() do
self:Call(v, "CreateFrame", button.unit)
end
end
function Gladdy:GetAnchor(unit, position)
local anchor = "healthBar"
if Gladdy.db.classIconPos == position then
anchor = "classIcon"
end
if Gladdy.db.trinketPos == position then
anchor = "trinket"
end
if anchor == Gladdy.db.racialAnchor and Gladdy.db.racialPos == position then
anchor = "racial"
end
return Gladdy.buttons[unit][anchor]
end