Thread Tools Display Modes
02-22-10, 03:03 AM   #1
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Statusbars and PTR

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
  Reply With Quote
02-22-10, 10:40 AM   #2
Xus
A Fallenroot Satyr
 
Xus's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 25
Originally Posted by Iza View Post
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

Last edited by Xus : 02-22-10 at 11:14 AM.
  Reply With Quote
02-22-10, 11:14 AM   #3
Iza
A Cyclonian
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 43
Originally Posted by Xus View Post
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.
Thanks a lot. Let's hope they do fix it. At least the way they are now makes them completely useless imo...
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Statusbars and PTR

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off