WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Help oUF Simple change the mana color (https://www.wowinterface.com/forums/showthread.php?t=55684)

cbdgv 08-28-17 02:27 AM

Help oUF Simple change the mana color
 
Hello
oUF Simple
How to change the mana color:confused:

similar :Class Colors

local colors = setmetatable({
power = setmetatable({
["MANA"] = { 100/255, 149/255, 237/255 },
["RAGE"] = { 205/255, 0/255, 0/255 },
["FOCUS"] = { 1, .5, .25 },
["ENERGY"] = { 1, 1, 0 },
["COMBO_POINTS"] = { 1, .96, .41 },
["RUNES"] = { .5, .5, .5 },
["RUNIC_POWER"] = { 0, .82, 1 },
["SOUL_SHARDS"] = { .5, .32, .55 },
["LUNAR_POWER"] = { .3, .52, .9 },
["MAELSTROM"] = { 0, .5, 1 },
["INSANITY"] = { .4, 0, .8 },
["CHI"] = { .71, 1, .92 },
["ARCANE_CHARGES"] = { .1, .1, .98 },
["FURY"] = { 54/255, 199/255, 63/255 },
["PAIN"] = { 255/255, 156/255, 0 },
-- vehicle colors
["AMMOSLOT"] = { 0.80, 0.60, 0.00 },
["FUEL"] = { 0.0, 0.55, 0.5 },
-- ["STAGGER"] = { {r = 0.52, g = 1.0, b = 0.52}, {r = 1.0, g = 0.98, b = 0.72}, {r = 1.0, g = 0.42, b = 0.42},},
}, {__index = oUF.colors.power}),
}, {__index = oUF.colors}


Thanks in advance.

thomasjohnshannon 10-13-17 02:13 AM

Something like this at the top of your main code should work.

local oUF = ns.oUF or oUF
oUF.colors.power['MANA'] = {0, 0.55, 1}

Just replace the values with your desired color.

You can thank lightspark and Phanx for that bit since it is the same code that gave me when I asked.

p3lim 10-13-17 11:54 AM

Quote:

Originally Posted by thomasjohnshannon (Post 325464)
Something like this at the top of your main code should work.

local oUF = ns.oUF or oUF
oUF.colors.power['MANA'] = {0, 0.55, 1}

Just replace the values with your desired color.

You can thank lightspark and Phanx for that bit since it is the same code that gave me when I asked.

If you're using oUF unembedded, that code will change the colors for all layouts you might have installed.
A better way of overriding colors is by doing it inside your style function, that way it will only apply to your layout.

Lua Code:
  1. local function myStyleFunc(self, unit)
  2.     self.colors.power.MANA = {0, 0.55, 1}
  3.  
  4.     ...
  5. end


All times are GMT -6. The time now is 02:20 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI