View Single Post
08-17-16, 06:06 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Also a better way to catch all these is probably:

lua Code:
  1. local TEXTURE = "Interface\\AddOns\\EVUI\\FrameBackground"
  2. local UnitFrames = {
  3.     PlayerFrame,
  4.     PetFrame,
  5.     TargetFrame,
  6.     TargetFrameToT,
  7.     FocusFrame,
  8.     FocusFrameToT,
  9.     PartyMemberFrame1,
  10.     PartyMemberFrame2,
  11.     PartyMemberFrame3,
  12.     PartyMemberFrame4,
  13. }
  14. local UnitFrameRegions = {
  15.     "healthBar",
  16.     "myHealPredictionBar",
  17.     "otherHealPredictionBar",
  18.     "healAbsorbBar",
  19.     "totalAbsorbBar",
  20.     "manaBar",
  21.     "myManaCostPredictionBar",
  22.     "spellbar",
  23. }
  24. local OtherStatusBars = {
  25.     CastingBarFrame,
  26.     MirrorTimer1StatusBar,
  27.     MirrorTimer2StatusBar,
  28.     MirrorTimer3StatusBar,
  29. }
  30. for _, frame in next, UnitFrames do
  31.     for _, region in next, UnitFrameRegions do
  32.         local bar = frame[region]
  33.         if bar and bar.SetStatusBarTexture then
  34.             bar:SetStatusBarTexture(TEXTURE)
  35.             bar:GetStatusBarTexture():SetHorizTile(true)
  36.         elseif bar and bar.SetTexture then
  37.             bar:SetTexture(TEXTURE)
  38.             bar:SetHorizTile(true)
  39.         end
  40.     end
  41. end
  42. for _, bar in next, OtherStatusBars do
  43.     bar:SetStatusBarTexture(TEXTURE)
  44.     bar:GetStatusBarTexture():SetHorizTile(true)
  45. end
__________________
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