Created
September 22, 2010 21:28
-
-
Save Evilpaul/592615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Vengeance Bar function | |
local function addVengeanceBar(self) | |
local _, class = UnitClass('player') | |
if class == 'DEATHKNIGHT' or class == 'DRUID' or class == 'PALADIN' or class == 'WARRIOR'then | |
local anchor = self.Runes and self.Runes or self.HolyPower and self.HolyPower or self | |
local vengeanceBar = CreateFrame('Frame', nil, self) | |
vengeanceBar:SetPoint('TOPLEFT', anchor, 'BOTTOMLEFT', 0, -1) | |
vengeanceBar:SetSize(config.PRIMARYUNITWIDTH, config.SPACING) | |
vengeanceBar:SetBackdrop(config.BACKDROP) | |
vengeanceBar:SetBackdropColor(0, 0, 0) | |
local statusBar = CreateFrame('StatusBar', nil, vengeanceBar) | |
statusBar:SetPoint('LEFT', vengeanceBar, 'LEFT', 0, 0) | |
statusBar:SetSize(config.PRIMARYUNITWIDTH, config.SPACING) | |
statusBar:SetStatusBarTexture(config.TEXTURE) | |
statusBar:SetStatusBarColor(0, 0, 1) | |
vengeanceBar.Bar = statusBar | |
local vengeanceBarText = statusBar:CreateFontString(nil, 'OVERLAY') | |
vengeanceBarText:SetPoint('CENTER', statusBar, 'CENTER', 0, 0) | |
vengeanceBarText:SetFont(config.FONT, config.FONTSIZE, config.FONTBORDER) | |
vengeanceBar.Text = vengeanceBarText | |
self.VengeanceBar = vengeanceBar | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment