WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Bottom right action bar resizing main bar! PLEASE HELP! (https://www.wowinterface.com/forums/showthread.php?t=58531)

ChandlerJoseph 01-07-21 03:17 PM

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!

Taudier 01-09-21 10:44 AM

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


ChandlerJoseph 01-09-21 06:10 PM

Thanks so much for the reply! I will tinker with this for a while and I will post my progress.


All times are GMT -6. The time now is 01:34 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI