secret
Last active

  • Download Gist
gistfile1.lua
Lua
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
lib.addPowerBar = function(f)
--statusbar
local s = CreateFrame("StatusBar", nil, f)
s:SetStatusBarTexture(cfg.powerbar_texture)
s:GetStatusBarTexture():SetHorizTile(true)
s:SetFrameLevel(1)
if f.mystyle=="boss" then
s:SetWidth(250)
s:SetHeight(8)
s:SetPoint("BOTTOMLEFT",f,"BOTTOMLEFT",0,0)
s:SetStatusBarColor(165/255, 73/255, 23/255, 1)
else
s:SetHeight(retVal(f,f:GetHeight()*.26,f:GetHeight()*.2,2))
s:SetWidth(f:GetWidth())
if f.mystyle=="raid" then
s:SetPoint("BOTTOM",f,"BOTTOM",0,0)
else
s:SetPoint("BOTTOM",f,"BOTTOM",0,0)
end
if f.mystyle=="player" then s:SetStatusBarColor(.1, .5, .85) end
end
s.frequentUpdates = true
--helper
if f.mystyle == "target" or f.mystyle == "player" or f.mystyle=="boss" then
local h = CreateFrame("Frame", nil, s)
h:SetFrameLevel(0)
h:SetPoint("TOPLEFT",-4,4)
h:SetPoint("BOTTOMRIGHT",4,-4)
lib.createBackdrop(h,0)
end
--bg
local b = s:CreateTexture(nil, "BACKGROUND")
b:SetTexture(cfg.powerbar_texture)
b:SetAllPoints(s)
if f.mystyle=="player" then b:SetVertexColor(0, .2, .36) end
f.Power = s
f.Power.bg = b
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.