Hello folks!
At first id like to thank everyone for the initial help they gave me on here. My layout is coming together the way i want to. But sadly im running into a Problem again with displaying Auras, or rather setting the TexCoord of the related icon.
this is located inside another .lua file
Lua Code:
local _,ns = ...
[-unrelated code-]
ns:UpdateAuraIcon = function(element, button)
button.overlay:SetAlpha(0)
button.icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
button.icon:SetDrawLayer('ARTWORK')
end
inside my Layout file im doing
Lua Code:
local Auras = CreateFrame('Frame', nil, self)
Auras.gap = true
Auras.size = 20
Auras:SetHeight(60)
Auras:SetWidth(200)
Auras:SetPoint('BOTTOMLEFT', self.Health, 'TOPLEFT', 0, 0)
Auras.initialAnchor = 'BOTTOMLEFT'
Auras['growth-x'] = 'RIGHT'
Auras['growth-y'] = 'UP'
Auras.numBuffs = cfg.numBuffs
Auras.numDebuffs = cfg.numDebuffs
Auras.spacing = 1
Auras.showStealableBuffs = true
Auras.PostCreateIcon = ns.UpdateAuraIcon
Auras.PostUpdateIcon = ns.PostUpdateIcon
self.Auras = Auras
For some reason, ns.UpdateAuraIcon doesnt trigger as far as i experienced
Other stuff inside the namespace, for example cfg.numBuffs is working fine. But it feels like it isnt triggering the function outside the .lua-file but inside the namespace? Am i doing something wrong regarding functions inside the namespace?
Thanks in advance and greetings!
EDIT:
I solved the issue by doing
lua Code:
function ns:UpdateAuraIcon(button)
i dont know why the other option didnt work, if someone knows. please feel free to explain