I'm getting an odd issue with a vertical status bar I'm working on. When I test out its appearance and not running, the texture is fine, but when the status bar is running, the texture is completely distorted.
This is when the bar is
not running.
This is when the bar
is running.
This is my code:
Lua Code:
local BackdropSB = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = nil,
tile = true,
tileSize = 16
}
-- Earth Elemental Duration Status Bar
local EarthElementalBar = CreateFrame("StatusBar","EarthElementalBar",EarthElementalBG);
EarthElementalBar:SetOrientation("VERTICAL");
EarthElementalBar:SetStatusBarTexture("Interface\\addons\\ShamanAuras\\media\\statusbar\\Glamour5.tga");
EarthElementalBar:GetStatusBarTexture():SetHorizTile(false);
EarthElementalBar:GetStatusBarTexture():SetVertTile(false);
EarthElementalBar:SetWidth(17);
EarthElementalBar:SetHeight(175);
EarthElementalBar:SetFrameStrata("LOW");
EarthElementalBar:SetPoint("CENTER",UIParent,"CENTER",0,0);
EarthElementalBar:SetStatusBarColor(0.84,0.65,0.51);
EarthElementalBar.bg = EarthElementalBar:CreateTexture(nil,"BACKGROUND");
EarthElementalBar.bg:SetTexture("Interface\\TargetingFrame\\UI-StatusBar");
EarthElementalBar.bg:SetAllPoints(true);
EarthElementalBar.bg:SetVertexColor(0,0,0);
EarthElementalBar:SetMinMaxValues(0,15);
-- Code when bar is running
SSA.EarthElementalBar:SetScript("OnUpdate",function(self,elapsed)
local expires = startTime + 15;
local remaining = parseTime((expires - GetTime()),true);
if ((tonumber(remaining) or 0) > 0) then
self.text:SetText(remaining);
self:SetValue(tonumber(remaining));
else
self:SetScript("OnUpdate",nil);
end
end);
Thanks for any help!