WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   MainMenuBar help (https://www.wowinterface.com/forums/showthread.php?t=58508)

ChandlerJoseph 12-31-20 07:29 AM

MainMenuBar help
 
When you enable the right action bar it moves the main bar over to the left to accommodate for the extra buttons. I would like it to not move the main bar when I enable it. Anyone know how I can do this?

Taudier 01-09-21 01:43 PM

this code, change 100 and 20 by what you want :

Code:

MainMenuBar:SetMovable(true)
MainMenuBar:SetUserPlaced(true)

CreateFrame("frame", nil, nil, "SecureHandlerBaseTemplate" ):WrapScript(ActionButton1, "OnShow", [[
local MainMenuBarArtFrame = self:GetParent()
local MainMenuBar = MainMenuBarArtFrame:GetParent()
local UIParent = MainMenuBar:GetParent()
MainMenuBar:SetPoint("BOTTOM", UIParent, "BOTTOM",100, 20)
]])

MainMenuBar:HookScript("OnEvent", function(self, event)
        if event == "PLAYER_ENTERING_WORLD" and not InCombatLockdown() then
                self:SetPoint("BOTTOM", UIParent, "BOTTOM", 100, 20)
        end
end)

if you change the option to show/hide the bottom right bar you have to reloadui


All times are GMT -6. The time now is 10:00 AM.

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