WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to globally change reaction color. (https://www.wowinterface.com/forums/showthread.php?t=18459)

Oakayam 10-08-08 10:30 AM

How to globally change reaction color.
 
Heya

Is it possible to globally change the UnitReactionColors? I have been using
Code:

RAID_CLASS_COLORS
to change the class colors but I haven't been able to come up with the script to deal with reaction colors. I'm not trying to attach the script to any specific addon atm, I would like to change the default UI behavior.

Any help would be appreciated.

Duugu 10-08-08 07:53 PM

This is from the default TargetFrame.lua:

Code:

UnitReactionColor = {
        { r = 1.0, g = 0.0, b = 0.0 },
        { r = 1.0, g = 0.0, b = 0.0 },
        { r = 1.0, g = 0.5, b = 0.0 },
        { r = 1.0, g = 1.0, b = 0.0 },
        { r = 0.0, g = 1.0, b = 0.0 },
        { r = 0.0, g = 1.0, b = 0.0 },
        { r = 0.0, g = 1.0, b = 0.0 },
};

You could change this table.

Oakayam 10-09-08 04:04 PM

Yes this was a first thing I tried but it doesn't seem to work. Perhaps I'm using it wrong? All I am doing it loading a file with with few lines of raw code. No functions, events, frames. I'm not sure why it works fine for class colors but wont for reaction colors.

Cirk 10-10-08 06:35 PM

GameTooltip_UnitColor(unit) is the function used for setting the reaction color in the tooltip. You could probably hook that without taint problems.

In WoW 3.0, the UnitReactionColor table has been replaced with the function:
Code:

ref, green, blue, alpha = UnitSelectionColor(unit)
Which is called in a bunch of places. I've no idea if hooking that would cause you taint issues.

-- Cirk


All times are GMT -6. The time now is 04:49 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI