View Single Post
03-03-11, 02:43 AM   #7
hankthetank
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 64
It surely is

http://www.wowpedia.org/UI_escape_sequences

I prefered my way so I have more control over the textures. Things like possible future or user edited vertex-coloring, anchoring etc.

The tag solution is easier to maintain as you can rely on the logics offered by oUF. You'd create empty elements like:

lua Code:
  1. self.Leader = self:CreateTexture()
  2. self.Resting = self:CreateTexture()
  3. -- and so on

Then you'd need a tag that updates with already existing standard tags:

lua Code:
  1. oUF.TagEvents["myIcons"] = oUF.TagEvents["resting"] .. " " .. oUF.TagEvents["leader"] -- etc.
  2.  
  3. oUF.Tags["xpRep"] = function(unit)
  4.     local ret = ""
  5.     local frame = _G["SomehowBuildTheUFNameFromThe" .. unit]
  6.  
  7.     ret = ret .. (frame.Leader:IsShown() and "|T.......|t" or "")
  8.     ret = ret .. (frame.Resting:IsShown() and "|T.......|t" or "")
  9.     return ret
  10. end

If you don't want to reference a frame inside a tag it goes down to my attempt just with building a string instead of anchoring elements which is where I would prefer the usage of actual oUF elements / textures.

Anyway, I think he got it now.

Last edited by hankthetank : 03-03-11 at 02:52 AM.
  Reply With Quote