View Single Post
04-05-12, 07:27 AM   #10
MiRai
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
I was actually laying low after the helpful people around here tore into that other guy. I did eventually figure how to manipulate the visibility of both the health and mana values per bar in the tags.lua file and my oUF_Fail is looking great.

Originally Posted by Irongunner View Post
I would also be interested in some info on how to style the battleground countdown-to-start timer, does someone have a hint?
I was just about to bump this as well asking for what I should be looking at in order to make that change because the only Lua I see about the mirror castbar is this:

lua Code:
  1. -- mirror castbar!
  2.   lib.gen_mirrorcb = function(f)
  3.     for _, bar in pairs({'MirrorTimer1','MirrorTimer2','MirrorTimer3',}) do  
  4.       for i, region in pairs({_G[bar]:GetRegions()}) do
  5.         if (region.GetTexture and region:GetTexture() == 'SolidTexture') then
  6.           region:Hide()
  7.         end
  8.       end
  9.       _G[bar..'Border']:Hide()
  10.       _G[bar]:SetParent(UIParent)
  11.       _G[bar]:SetScale(1)
  12.       _G[bar]:SetHeight(16)
  13.       _G[bar]:SetWidth(280)
  14.       _G[bar]:SetBackdropColor(.1,.1,.1)
  15.       _G[bar..'Background'] = _G[bar]:CreateTexture(bar..'Background', 'BACKGROUND', _G[bar])
  16.       _G[bar..'Background']:SetTexture(cfg.statusbar_texture)
  17.       _G[bar..'Background']:SetAllPoints(bar)
  18.       _G[bar..'Background']:SetVertexColor(.15,.15,.15,.75)
  19.       _G[bar..'Text']:SetFont(cfg.font, 14, "THINOUTLINE")
  20.       _G[bar..'Text']:ClearAllPoints()
  21.       _G[bar..'Text']:SetPoint('CENTER', MirrorTimer1StatusBar, 0, 1)
  22.       _G[bar..'StatusBar']:SetAllPoints(_G[bar])
  23.       --glowing borders
  24.       local h = CreateFrame("Frame", nil, _G[bar])
  25.       h:SetFrameLevel(0)
  26.       h:SetPoint("TOPLEFT",-5,5)
  27.       h:SetPoint("BOTTOMRIGHT",5,-5)
  28.       lib.gen_backdrop(h)
  29.     end
  30.   end

I'm not even sure I'm going about this the correct why by calling it a mirror castbar. I believe /framestack is calling the frame "TimerTrackerTimer1" and "TimerTrackerTimer1StatusBar". Can I just make it look something like this?

lua Code:
  1. -- mirror castbar!
  2.   lib.gen_mirrorcb = function(f)
  3.     If for _, bar in pairs({'MirrorTimer1','MirrorTimer2','MirrorTimer3',}) do  
  4.          for i, region in pairs({_G[bar]:GetRegions()}) do
  5.            if (region.GetTexture and region:GetTexture() == 'SolidTexture') then
  6.              region:Hide()
  7.            end
  8.          end
  9.          _G[bar..'Border']:Hide()
  10.          _G[bar]:SetParent(UIParent)
  11.          _G[bar]:SetScale(1)
  12.          _G[bar]:SetHeight(16)
  13.          _G[bar]:SetWidth(280)
  14.          _G[bar]:SetBackdropColor(.1,.1,.1)
  15.          _G[bar..'Background'] = _G[bar]:CreateTexture(bar..'Background', 'BACKGROUND', _G[bar])
  16.          _G[bar..'Background']:SetTexture(cfg.statusbar_texture)
  17.          _G[bar..'Background']:SetAllPoints(bar)
  18.          _G[bar..'Background']:SetVertexColor(.15,.15,.15,.75)
  19.          _G[bar..'Text']:SetFont(cfg.font, 14, "THINOUTLINE")
  20.          _G[bar..'Text']:ClearAllPoints()
  21.          _G[bar..'Text']:SetPoint('CENTER', MirrorTimer1StatusBar, 0, 1)
  22.          _G[bar..'StatusBar']:SetAllPoints(_G[bar])
  23.          --glowing borders
  24.          local h = CreateFrame("Frame", nil, _G[bar])
  25.          h:SetFrameLevel(0)
  26.          h:SetPoint("TOPLEFT",-5,5)
  27.          h:SetPoint("BOTTOMRIGHT",5,-5)
  28.          lib.gen_backdrop(h)
  29.        end
  30.     else for _, bar in pairs({'TimerTrackerTimer1','TimerTrackerTimer2','TimerTrackerTimer3',}) do  
  31.          for i, region in pairs({_G[bar]:GetRegions()}) do
  32.            if (region.GetTexture and region:GetTexture() == 'SolidTexture') then
  33.              region:Hide()
  34.            end
  35.          end
  36.          _G[bar..'Border']:Hide()
  37.          _G[bar]:SetParent(UIParent)
  38.          _G[bar]:SetScale(1)
  39.          _G[bar]:SetHeight(16)
  40.          _G[bar]:SetWidth(280)
  41.          _G[bar]:SetBackdropColor(.1,.1,.1)
  42.          _G[bar..'Background'] = _G[bar]:CreateTexture(bar..'Background', 'BACKGROUND', _G[bar])
  43.          _G[bar..'Background']:SetTexture(cfg.statusbar_texture)
  44.          _G[bar..'Background']:SetAllPoints(bar)
  45.          _G[bar..'Background']:SetVertexColor(.15,.15,.15,.75)
  46.          _G[bar..'Text']:SetFont(cfg.font, 14, "THINOUTLINE")
  47.          _G[bar..'Text']:ClearAllPoints()
  48.          _G[bar..'Text']:SetPoint('CENTER', TimerTrackerTimer1StatusBar, 0, 1)
  49.          _G[bar..'StatusBar']:SetAllPoints(_G[bar])
  50.          --glowing borders
  51.          local h = CreateFrame("Frame", nil, _G[bar])
  52.          h:SetFrameLevel(0)
  53.          h:SetPoint("TOPLEFT",-5,5)
  54.          h:SetPoint("BOTTOMRIGHT",5,-5)
  55.          lib.gen_backdrop(h)
  56.        end
  57.   end

Don't laugh too hard I'm sure I'm murdering Lua.
  Reply With Quote