Hey everyone, I got a slight problem with my modified ouf_Ammo layout (used the latest version from wowace, also using latest version of oUF from curse):
In the default ouf_Ammo, the buffs are shown at the bottom left whereas the debuffs are shown at the top right. I want the buffs to stay at the very same position but i want the debuffs to be directly below them.
Consequently, i changed the SetPoint-thingy for the debuffs to "anchor" it to the buffs-frame:
Code:
debuffs:SetPoint("TOPLEFT", buffs, "BOTTOMLEFT",0,-5)
The problem is that this remains static so that when there are lots of buffs and there are 2 or 3 rows of them, they begin to overlap as can be seen here:
http://www.abload.de/img/wowscrnshot_030109_230yo5t.jpg
(note that i didn't use the -5px here but more)
Now i went to irc and stolenlegacy was kind enough to help. He tried adding a function (he is well aware that this isnt good style and all but he didn't really know ouf well but still was kind enough to try and help me)
Code:
local function updateBuffFrame(self, event, unit)
if ammo_debuffs and ammo_buffs then
ammo_debuffs:ClearAllPoints();
ammo_debuffs:SetPoint("TOPLEFT", ammo_buffs, "BOTTOMLEFT",0,-5);
end
end
this is called (i presume, i hardly know lua and wow api stuff
) in the function setStyle by "self.UNIT_AURA = updateBuffFrame"
Adding this function however just hides any buffs and debuffs without giving any kind of lua error
As a reference, here is the current "positioning" code:
Code:
if unit and not unit:find("party%dtarget") and not unit:find("partypet%d") then
local buffs = CreateFrame("Frame", nil, self)
buffs.size = buffheight
buffs:SetHeight(buffheight)
buffs:SetWidth(buffwidth)
buffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT",-1.5, -3)
buffs.initialAnchor = "TOPLEFT"
buffs["growth-y"] = "DOWN"
buffs.num = 40
if unit == "player" or unit== "targettarget" or unit == "focus" then buffs.num = 0 end
self.Buffs = buffs
local debuffs = CreateFrame("Frame", nil, self)
ammo_buffs = buffs
ammo_debuffs = debuffs
debuffs.size = buffheight
debuffs:SetHeight(buffheight)
debuffs:SetWidth(buffwidth)
debuffs:SetPoint("TOPLEFT", buffs, "BOTTOMLEFT",0,-5)
debuffs.initialAnchor = "TOPLEFT"
debuffs["growth-y"] = "DOWN"
debuffs["growth-x"] = "RIGHT"
debuffs.num = 40
if unit == "player" or unit== "targettarget" or unit == "focus" then debuffs.num = 0 end
self.Debuffs = debuffs
anyone got an idea how that could work the way i want it to?
and as another annoying bonus question (it's not too important) from someone who loves ouf but probably shouldn't use it: is it possible to increase the scale of the debuffs you caused on the target? i have aurasort and somehow made it show them first but a slight increase in scale would probably be easier to see