View Single Post
08-18-16, 12:32 AM   #7
mich125
A Fallenroot Satyr
Join Date: Jan 2010
Posts: 27
Originally Posted by Phanx View Post
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
Thanks for reply m8, your code doesn't seem to work for me tho, and about my addon, its just for my use, i am not rly a developer, just using some scripts i find to improve my ui.
  Reply With Quote