Code:
_, myclass = UnitClass("player")
if (myclass == "WARLOCK" or myclass == "PALADIN") then
local bars = CreateFrame("Frame", nil, self)
bars:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, Scale(5))
if lowversion then
bars:SetWidth(Scale(186))
else
bars:SetWidth(Scale(fWidth))
end
bars:SetHeight(Scale(8))
for i = 1, 3 do
bars[i]=CreateFrame("StatusBar", self:GetName().."_Shard"..i, self)
bars[i]:SetHeight(Scale(5))
bars[i]:SetStatusBarTexture(normTex)
bars[i]:GetStatusBarTexture():SetHorizTile(false)
bars[i].bg = bars[i]:CreateTexture(nil, 'BORDER')
if myclass == "WARLOCK" then
bars[i]:SetStatusBarColor(255/255,101/255,101/255)
bars[i].bg:SetTexture(255/255,101/255,101/255)
elseif myclass == "PALADIN" then
bars[i]:SetStatusBarColor(228/255,225/255,16/255)
bars[i].bg:SetTexture(228/255,225/255,16/255)
end
if i == 1 then
bars[i]:SetPoint("LEFT", bars)
if lowversion then
bars[i]:SetWidth(Scale(fWidth/3 - 4.8))
else
bars[i]:SetWidth(Scale(fWidth/3 - 4.8)) -- setting SetWidth here just to fit fit 250 perfectly
end
bars[i].bg:SetAllPoints(bars[i])
else
bars[i]:SetPoint("LEFT", bars[i-1], "RIGHT", Scale(7), 0)
if lowversion then
bars[i]:SetWidth(Scale(fWidth/3 - 4.8))
else
bars[i]:SetWidth(Scale(fWidth/3 - 4.8)) -- setting SetWidth here just to fit fit 250 perfectly
end
bars[i].bg:SetAllPoints(bars[i])
end
bars[i].bg:SetTexture(normTex)
end
if myclass == "WARLOCK" then
bars.Override = UpdateShards
self.SoulShards = bars
elseif myclass == "PALADIN" then
bars.Override = UpdateHoly
self.HolyPower = bars
end
end
tukui code, just remove scale() and change width and heigh