Thread Tools Display Modes
06-27-15, 12:31 AM   #1
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Neav raid color text

I'm trying to add some color to the name text in the frames. I guess this is best doing in the tags file.
However i do have some problems with format i belive.

This is the original code:
Code:
oUF.Tags.Events['name:raid'] = 'UNIT_NAME_UPDATE'
oUF.Tags.Methods['name:raid'] = function(unit)
    local name = UnitName(unit)
    return ns.utf8sub(name, config.units.raid.nameLength)
end
My guess was something like:
local _, class = UnitClass(unit)
local color = oUF.colors.class[class]
return something format something name something
So.. any suggestions?
  Reply With Quote
06-27-15, 06:45 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Replace where the tag is in the layout ([name:raid]) with this: [raidcolor][name:raid]

If you really want to modify or make a new tag, take a look at the source for [raidcolor].
https://github.com/haste/oUF/blob/96....lua#L121-L126
  Reply With Quote
06-28-15, 11:19 AM   #3
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Thanks, il check it out.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Neav raid color text


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off