View Single Post
12-03-12, 11:49 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Vlad View Post
Hmm, I hooked the SetStatusBarColor but the C-code doesn't seem to fire in a way that the hook also fires, meaning the color remains purple.
Try hooking it this way:

Code:
hooksecurefunc(healthBar:GetStatusBarTexture(), "SetVertexColor", function(texture, r, g, b, a)
    print("statusbar texture vertex color changed to", r, g, b, a)
end)
I'm pretty sure healthBar:SetStatusBarColor() is really just a wrapper for healthBar:GetStatusBarTexture():SetVertexColor() in which case it would make sense for the internal API to just call that directly.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote