Hello.
Been trying to do a layout based on oUF_P3lim.
I make a frame for Power in my shared function, and I set
everything works fine at this point, no issues.
But if I then set
after previous line, the powerbar no longer updates the value. So even if I have 50% power, the bar is completely filled.
Any ideas?
Lua Code:
local function Shared(self, unit)
...
local Power = CreateFrame('StatusBar', nil, self)
Power:SetHeight(20)
Power:SetWidth(200)
Power:SetStatusBarTexture(TEXTURE)
Power:SetPoint('BOTTOMRIGHT')
Power:SetPoint('CENTER')
Power.frequentUpdates = true
Power.colorClass = false
Power.colorPower = true
local PowerBG = Power:CreateTexture(nil, 'BORDER')
PowerBG:SetAllPoints(Power)
PowerBG:SetTexture(TEXTURE)
PowerBG:SetAlpha(1)
PowerBG.multiplier = .3
local PowerValue = Power:CreateFontString(nil, 'OVERLAY')
PowerValue:SetPoint('LEFT', 5, 0)
PowerValue:SetJustifyH('LEFT')
PowerValue:SetFont(FONT, 12)
PowerValue:SetShadowOffset(1, -1)
PowerValue.frequentUpdates = 0.1
local PowerPercent = Power:CreateFontString(nil, "OVERLAY")
PowerPercent:SetPoint("RIGHT", -5, 0)
PowerPercent:SetFont(FONT, 12)
PowerPercent:SetShadowOffset(1, -1)
PowerPercent:SetJustifyH("RIGHT")
PowerPercent.frequentUpdates = 0.1
Power.PowerPercent = PowerPercent
Power.bg = PowerBG
Power.PowerValue = PowerValue
self.Power = Power
self.Power.Smooth = true
end