View Single Post
01-09-21, 10:44 AM   #2
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
the global name of the bar is "StatusTrackingBarManager"

the blizzard file is "StatusTrackingBar.lua"


you can access to the bars with this code :

Code:
local visibleBars = {};
for i, bar in ipairs(StatusTrackingBarManager.bars) do
	if ( bar:ShouldBeVisible() ) then
		table.insert(visibleBars, bar);
	end
end
and set the width wih the function :

Code:
function StatusTrackingBarManager:SetSingleBarSize(bar, width) 
	local textureHeight = self:GetInitialBarHeight();
	if( self.largeSize ) then  
		self.SingleBarLarge:SetSize(width, textureHeight); 
		self.SingleBarLarge:SetPoint("CENTER", bar, 0, 0);
		self.SingleBarLarge:Show(); 
	else
		self.SingleBarSmall:SetSize(width, textureHeight); 
		self.SingleBarSmall:SetPoint("CENTER", bar, 0, 0);
		self.SingleBarSmall:Show(); 
	end
	local progressWidth = width - self:GetEndCapWidth() * 2;
	bar.StatusBar:SetSize(progressWidth, textureHeight);
	bar:SetSize(progressWidth, textureHeight);
end

Last edited by Taudier : 01-09-21 at 11:04 AM.
  Reply With Quote