View Single Post
02-26-09, 11:38 AM   #821
lanacan
A Warpwood Thunder Caller
 
lanacan's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 94
Question about PvP Tags just so I'm clear as I'm new to coding in lua and using the oUF Tags.

If I want to have the text the pvp tag returns show i would do this to initiate the tag in the layout:

Code:
 
if (pvpicons) then
        oUF.Tags['[pvp]'] = function(u) return UnitIsPVP(u) and "PvP" end
        oUF.TagEvents['[pvp]'] = 'UNIT_FACTION'
end
Then place this below to make the tag visible correct (inside health on raid frames):
Code:
if (pvpicons) then
        local pvpFlag = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightLeft')
        pvpFlag:SetPoint('LEFT', 3, 0)
        self:Tag(pvpFlag, '[pvp]')
end
How would I change the second part so I could place the text outside of the unitframe on the left or right side?

I'm looking to add them to the following frames:
- player (right side outside of frame top of text inline with top edge of frame)
- target (same as player but on the left side)
- pet (just above the frames top left corner)


Thank you
__________________
Busy modifying your code for my own UI.