View Single Post
08-17-16, 05:58 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Keep in mind that solution will not work for anyone else using your addon (if you plan to release it).

The health bar texture wasn't getting changed. The red bar in your screenshot is the additional bars for heals and absorbs. To fix that, you just need to set the textures for those:

Code:
frame.myHealPredictionBar:SetTexture(x)
frame.otherHealPredictionBar:SetTexture(x)
frame.totalAbsorbBar:SetTexture(x)
frame.healAbsorbBar:SetTexture(x)
(Note these aren't StatusBar objects, just Texture, so you use SetTexture instead of SetStatusBarTexture.)

The power bar texture does get reset, because some power types now have unique textures (eg. maelstrom for enhancement shamans). Use a hook to reapply your desired texture every time it gets updated:

Code:
hooksecurefunc("UnitFrameManaBar_UpdateType", function(manaBar)
    manaBar:SetStatusBarTexture(x)
end)
There's also a "mana cost prediction bar" that shows how much mana will be deducted for the spell you're currently casting:

Code:
frame.myManaCostPredictionBar:SetTexture(x)
__________________
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