Im lovin P3lim so far, but ive been trying to add some things to it, like focus target, pet target pvp flag, and a couple other things... This has probably been asked before (couldnt find much from a search), but is there any documentation on oUF? I get the basics, but some official documentation would really help me out.
local tof = oUF:Spawn("focustarget", "oUF_Focustarget")
tof:SetPoint("LEFT", focus, "RIGHT", 8, 0)
if unit == "focustarget" then
name:SetPoint("LEFT", hp, "RIGHT", -112, -17)
of course this will just show name/hp/powerbar and no buffs/debuffs
for pvp i used
local UnitIsPVP = UnitIsPVP
at the top where other local stuff is defined
local updatePvP = function(self, event, unit)
if(unit ~= self.unit) then return end
then at the bottom
if(unit == "player" or unit == "target") then
local pvp = hp:CreateFontString(nil, "OVERLAY")
pvp:SetPoint("CENTER", hp, "TOP")
self.PvP = pvp
self.UNIT_FACTION = updatePvP
i included my pretty edited koskens layout (many thx to kosken for a great layout)
some stuff i tried to comment but i just havnt gotten around to comment everything
Thanks tiana!! Got the pvp flag working great, but the focus target is givin me trouble.. not sure what im doin wrong, but im not gettin any errors and the frames not showin up.
if unit=="focustarget" then
local name = hp:CreateFontString(nil, "OVERLAY")
name:SetPoint("LEFT", 2, -1)
name:SetPoint("RIGHT", hp, "LEFT")
self.Name = name
self.UNIT_NAME_UPDATE = updateName
then at the end
local fot = oUF:Spawn("focustarget", "oUF_Focustarget")
fot:SetPoint("LEFT", focus, "RIGHT", 0, 30)
I have a little question. I'm using Rabbit's Layout and I have a small problem with the member's names on raid frames.
Ex : Let's say my toon name is R?bbit(note the accent). On the player/target/tot/focus frames "R?bbit" is written correctly. But on the raid frame i get this : R?.
I've read the lua code of the raid layout and it seems the problem comes from the substring function in the UpdateNameRaid function :
local function updateNameRaid(self, event, unit)
[...] local n = UnitName(u)
The objective of the function is to truncate the name to 3 chars (like in grid). Is there another substring function i might use to bypass this little problem (In grid i have no problem with my truncated name) ?