I'm trying to make it so you can left-click the buffs frame to toggle between Show all buffs and show only my buffs. It doesn't work...
Code:
self.Buffs:SetScript("OnMouseUp", function(self, btn)
local frame = self:GetParent()
if btn == "LeftButton" then
frame.Buffs.onlyShowPlayer = not frame.Buffs.onlyShowPlayer
Henna.db.profile.mybuffsonly = frame.Buffs.onlyShowPlayer
print (frame.Buffs.onlyShowPlayer )
end
if btn == "RightButton" then
print ("You must type /cancel <buff name> to cancel a buff.")
end
end)
Advice?
Also I can't update the sizes from my Config panel.
Code:
buffsize = {
name = "Buff Size",
type = "range",
min = 14, max = 32, step = 1,
arg = "buffsize",
get = function() return Henna.db.profile.buffsize end,
set = function(info, v) Henna.db.profile.buffsize = v
for i,v in pairs(oUF.objects) do
if (v.unit ~= nil) then
if (v.Buffs) then v.Buffs.size = Henna.db.profile.buffsize end
if (v.Debuffs) then v.Debuffs.size = Henna.db.profile.buffsize end
end
end
end,
}
This second part, I think I need to use SetSize instead, but I can't figure out the name of my target frames. I've tried everything I could think of, from reading oUF/elements/aura.lua. It works when you use /reload ui, but I have all the rest of the file working without using a reload, so this last part is irksomely inconsistent.
Thanks for any help!