View Single Post
01-09-13, 05:49 AM   #3
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Sorry here is the rest of the target arrow code

Code:
lib.setTargetArrowColor = function(self)
	local _, cType = UnitClass("target")
	local ccolor = oUF.colors.class[cType] or {.3,.45,.65}
	self.Power.arrow:SetVertexColor(unpack(ccolor))
end
and here is the currently working player arrow code

Code:
lib.setArrowColor = function(self)
    local _, pType = UnitPowerType("player")
    local pcolor = oUF.colors.power[pType] or {.3,.45,.65}
    self.Power.arrow:SetVertexColor(unpack(pcolor))
end
Code:
self:RegisterEvent("PLAYER_LOGIN", lib.setFocusTargetArrowColor)
self:RegisterEvent("PLAYER_ENTERING_WORLD", lib.setFocusTargetArrowColor)
self:RegisterEvent("UNIT_DISPLAYPOWER", lib.setFocusTargetArrowColor)
The arrow tracks along the energy/rage/focus/mana/runic power bar

There are some images as well as a little discussion at http://www.wowinterface.com/download....html#comments in case it's not clear what I am trying to do.
  Reply With Quote