Thread Tools Display Modes
01-07-21, 03:17 PM   #1
ChandlerJoseph
A Fallenroot Satyr
Join Date: Aug 2019
Posts: 20
Bottom right action bar resizing main bar! PLEASE HELP!

Alright, im gonna just say it, I am desperate for help. This is my 4th post pertaining to the MainMenuBar and I have spent hours searching for answers on forums and in the code itself. I am pretty new to making addons though so I may have seen it and skipped over it. When you enable the right bottom action bar it moves the MainMenuBar and resizes the XP bar. I would like for the action bar to ignore this resizing function or maybe its an event, im not sure. Any help is appreciated. Thanks!
  Reply With Quote
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
01-09-21, 06:10 PM   #3
ChandlerJoseph
A Fallenroot Satyr
Join Date: Aug 2019
Posts: 20
Thanks so much for the reply! I will tinker with this for a while and I will post my progress.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Bottom right action bar resizing main bar! PLEASE HELP!

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