Thread Tools Display Modes
12-31-20, 07:29 AM   #1
ChandlerJoseph
A Fallenroot Satyr
Join Date: Aug 2019
Posts: 20
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?
  Reply With Quote
01-09-21, 01:43 PM   #2
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
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

Last edited by Taudier : 01-09-21 at 02:01 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » MainMenuBar 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