Quantcast WoWInterface - View Single Post - oUF - Layout discussion
View Single Post
10-07-08, 06:47 AM   #53
A Deviate Faerie Dragon
Frayol's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2008
Posts: 10
Originally Posted by p3lim View Post
You can easily do this with custom tags, but it doesnt really have anything to do with unitframes, so thats the reason haste havent implemented it.
I wasn't aware of that, but fair enough. I have been trying to wrap my head around custom tags, but keep hitting a brick wall.

Originally Posted by Slakah View Post
You could add some custom tags:

oUF.Tags["[AFK]"] = function(u) return UnitIsAFK(u) and "AFK" or ""
oUF.Tags["[DND]"] = function(u) return UnitIsDND(u) and "DND" or ""

oUF.TagEvents["[AFK]"] = "UNIT_FLAGS"
oUF.TagEvents["[DND]"] = "UNIT_FLAGS"
(note: I'm not certain if the event is correct as I don't have access to WoW currently.)

and then use those tags as you would normally.
Originally Posted by p3lim View Post

(dont be fooled by the name of the event, it works for any unit)
Is there a good example of how to implement this that you know of and I could take a look at? The theory seemed simple enough, but I have failed miserably to understand it.