Quantcast UnitReaction color - WoWInterface
Thread Tools Display Modes
04-13-18, 03:44 PM   #1
GreyFox777
A Cyclonian
Join Date: Jan 2017
Posts: 46
UnitReaction color

Hello guys,

im trying to edit a name tag to work with color reaction, but no success. Can you help me to edit the code please?

self.Name:SetTextColor(unpack(cfg.colors.health))
instead of cfg.colors.health it should be the reactiontable (i have it already). Im just don't know how to setup correctly the table.



Table:

oUF.colors.reaction = {
[1] = {182/255, 34/255, 32/255},
[2] = {182/255, 34/255, 32/255},
[3] = {182/255, 92/255, 32/255},
[4] = {220/225, 180/255, 52/255},
[5] = {132/255, 181/255, 26/255},
[6] = {132/255, 181/255, 26/255},
[7] = {132/255, 181/255, 26/255},
[8] = {132/255, 181/255, 26/255},
}

Last edited by GreyFox777 : 04-13-18 at 03:49 PM.
  Reply With Quote
04-14-18, 04:17 AM   #2
Rainrider
A Scalebane Royal Guard
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 438
The tag function: https://github.com/Rainrider/oUF_Lay...gs.lua#L15-L31
Registering it with oUF: https://github.com/Rainrider/oUF_Lay.../tags.lua#L172
Setting up the events: https://github.com/Rainrider/oUF_Lay.../tags.lua#L173
Setting up the font strings (creation, placement, building a compound tag): https://github.com/Rainrider/oUF_Lay....lua#L195-L219
Attaching it to a unit frame: https://github.com/Rainrider/oUF_Lay...rimary.lua#L59

As for the colors, you are advised not to overwrite oUF colors directly but rather use a metatable. See here for an example.

Last edited by Rainrider : 04-14-18 at 04:21 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » UnitReaction color

Thread Tools
Display Modes

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