Originally Posted by Iza
Hello everybody,
yesterday I copied my addon (VuhDo) to PTR to see if it's working alright there. Guess what: It didn't. Blizz must have changed something about status bars. The status bar textures don't match the size of the status bars anymore. The textures seem to be displayed in their original aspect ratios. In fact they seem to shrink in their height but not the width. Only the color will be applied on the correct width. Here's a screenshot of what I mean:
http://www.flickr.com/photos/15853848@N03/?saved=1
Thanks in advance,
Iza
|
I created this for the Spell Timer of ForteXorcist when I noticed that:
Code:
local function NewStatusBar(parent)
local bar = CreateFrame("Frame",nil,parent);
bar.parent = parent;
bar.texture = bar:CreateTexture(nil,"ARTWORK");
bar.texture:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, 0);
bar.origSetWidth = bar.SetWidth;
bar.SetWidth = function(self,val)
self:origSetWidth(val);
self:SetValue(self.value);
end
bar.SetStatusBarColor = function(self,r,g,b,a)
self.texture:SetVertexColor(r,g,b,a);
end
bar.GetStatusBarColor = function(self)
return self.texture:GetVertexColor();
end
bar.SetValue = function(self,value)
--[[if value < 0 then
value = 0;
elseif value > 1 then
value = 1;
end]]
self.value = value;
self.texture:SetTexCoord(0, value, 0, 1);
self.texture:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", (value-1)*self:GetWidth(), 0);
end
bar.SetStatusBarTexture = function(self,texture)
self.texture:SetTexture(texture);
end
bar:SetValue(1);
return bar;
end
It doesn't have all the functions that the real statusbar has and it always takes a value from 0.0 to 1.0. It's not that hard to make it behave in exactly the same way as the original, I just don't need the other stuff atm
I assume blizzard will fix the real one themselves though.
edit: miss-spelled my own addon haha :P