Originally Posted by drakull
I managed to show/hide LFD icons using OnEnter and OnLeave scripts but i'm getting artifacts in place of the role icon if no role has been defined to that unit.
What I need is a way to determine if the unit has been asigned a role in order to show (or not) the icon, but I don't think OnEnter passes anything else but the frame so I can't use UnitGroupRolesAssigned().
|
you could try something like this...
lua Code:
local createLFDRole = function(self)
self.LFDRole = self.Health:CreateTexture(nil, "OVERLAY")
self.LFDRole:SetTexture("Interface\LFGFrame\UI-LFG-ICON-PORTRAITROLES")
self.LFDRole:SetSize(12, 12)
end
and then, wherever u are setting the role icons, for ur party/raid.... put something like this..
lua Code:
createLFDRole(self)
self.LFDRole:SetPoint("TOPRIGHT", self.Health,'TOPRIGHT', 0, 0)
this is my coding i use for my oUF for showing role icons on the party members... basically putting the top part, somewhere at beginning, with ur tags or whatever... then putting the second part within the party frame coding, itself.
hope this helps.....