Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-18-14, 12:22 PM   #1
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
powercolor and druidform

Can i use "power.colorPower = true" on a texture other than the powerbar that updates based on the druidform.

this is what I have now, it works as long as I'm in the same stance as when I reloaded.
but as soon I change form the color will not change (from yellow to red and so on)

Lua Code:
  1. local powerType, powerToken = UnitPowerType("player")
  2. local powerColor = PowerBarColor[powerToken]
  3.        
  4. local EventFrame = CreateFrame("Frame")
  5. EventFrame:RegisterEvent("UNIT_" .. powerToken)

and I use this to set the color
Lua Code:
  1. rt2:SetVertexColor(powerColor.r, powerColor.g, powerColor.b)

So I was wondering if there is another code I could use that will update when I changes form

*edit: also I get a errormessage when I log in, and it is gone after a /reload

Last edited by saxitoxin : 03-18-14 at 12:40 PM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » powercolor and druidform


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