My issue is that my background is appearing above the foreground of my statusbar, here's what I got so far.
Lua Code:
local statusbar = CreateFrame("StatusBar", nil, frame)
statusbar:SetPoint("CENTER", frame, "CENTER", 0, 0)
statusbar:SetWidth(105)
statusbar:SetHeight(19)
statusbar:SetStatusBarTexture("Interface\\TARGETINGFRAME\\UI-StatusBar")
statusbar:GetStatusBarTexture():SetHorizTile(false)
statusbar:GetStatusBarTexture():SetVertTile(false)
statusbar:SetStatusBarColor(0.7, 0.70, 0)
statusbar:SetMinMaxValues(0,maxEnergy)
statusbar:SetValue(100)
statusbar.bg = statusbar:CreateTexture(nil, "BACKGROUND")
statusbar.bg:SetTexture("Interface\\TARGETINGFRAME\\UI-StatusBar")
statusbar.bg:SetAllPoints(true)
statusbar.bg:SetVertexColor(0.2, 0.2, 0)
I've tried alot of things, any help would be great.