Hello! I'm trying to attach a icon to a given spell, but i'm only able to anchor to one button, is it possible to clone/duplicate a region? Haven't found anything, neither figured out how cloning works with the code on github.
So far, my code looks like this.
local anchor = function()
local spellName = aura_env.region.states[1].trigger.spellName
local actionButtons = aura_env.getButtons(spellName)
print(aura_env.regions)
for _,button in pairs(actionButtons) do
-- HERE I'd like "clone/duplicate" the region and add one for each actionbar button that the spell is found
aura_env.region:SetHeight(button:GetHeight())
aura_env.region:SetWidth(button:GetWidth())
aura_env.region:SetPoint("CENTER", button, "CENTER", 0, 0)
end
end
Any tips on how to duplicate the aura_env.region?