View Single Post
07-16-10, 02:34 PM   #56
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 196
ia there a way to change the default reaction colors, in 1.4

I use to define the colors with

Code:
local FACTION_BAR_COLORS = {
	[0] = {r = 1, g = 0.3, b = 0.22}, 
	[1] = {r = 0.8, g = 0.3, b = 0.22}, -- hated, dark red
	[2] = {r = 1, g = 0, b = 0},		-- hostile, bright red
	[3] = {r = 1, g = 0.5, b = 0},		-- unfriendly, orange
	[4] = {r = 0.9, g = 0.7, b = 0},	-- neutral, yellow
	[5] = {r = 0, g = 0.6, b = 0.1},	-- friendly, dark green
	[6] = {r = 0, g = 1, b = 0},		-- honored,	bright green
	[7] = {r = 0.25, g = 0.4, b = 0.9},	-- reverted, blue
	[8] = {r = 0.6, g = 0.2, b = 0.8},	-- exalted, purple
}
I did try to change it to 1.4
Code:
local fcolors = setmetatable({
	fraction = setmetatable({
	[0] = {r = 1, 0.3, 0.22}, 
	[1] = {r = 0.8, 0.3, 0.22},  -- hated, dark red
	[2] = {r = 1,  0, 0},		  -- hostile, bright red
	[3] = {r = 1, 0.5, 0},	  -- unfriendly, orange
	[4] = {r = 0.9, 0.7, 0},	  -- neutral, yellow
	[5] = {r = 0, 0.6, 0.1},	  -- friendly, dark green
	[6] = {r = 0, 1, 0},		  -- honored,	bright green
	[7] = {r = 0.25, 0.4, 0.9},  -- reverted, blue
	[8] = {r = 0.6, 0.2, 0.8},	  -- exalted, purple
	}, {__index = oUF.colors.fraction}),
}, {__index = oUF.fcolors})
the idear behind this is to color the powerbar if

Code:
self.Power.colorReaction = true
  Reply With Quote