How Can I Unregister Clicks From MainMenuBar/Actionbars?

I’m trying to figure out how to make it so that buttons4 and 5 on the mouse pass through the main action bars.

local ACTION_BARS = {
	"ActionButton",
	"MultiBarBottomLeftButton",
	"MultiBarBottomRightButton",
	}
for barNum = 1, #ACTION_BARS do
	local ButtonName = ACTION_BARS[barNum]
	for i = 1,12,1 do
		local ButtonsOntoBar = ButtonName .. i
		local PreviousButton = ButtonName .. i-1
		_G[ButtonsOntoBar]:RegisterForClicks("LeftButtonUp","RightButtonUp", "MiddleButtonUp")
	end
end

The issue with the above is that the bars still block the clicks from passing through to the world frame behind the actionbars.


The tldr is that I have a disabled friend who can only play with one-hand, and they would like to be able to use clicktomove using button4 or 5. But as you can imagine, they are a clicker-- Cant use the mousewheel ether due to injury-- And the issue with being a clicker is that their mouse is always going to be over the actionbar.

Pretty sure Bartender has this functionality built in.

Note the restrictions since 10.1.5.

Said friend isn’t very computer-savvy, so I wanted to do this with as little need to manage as possible going forward.

Thanks for pointing that out. That was exactly what I needed.

In case anyone else is looking for an answer in the future-- This is what I ended up doing:

local ActionBars = { "Action", "MultiBarBottomLeft", "MultiBarBottomRight" }

local function clickThrough()
	MainMenuBar:SetPassThroughButtons("Button4", "Button5")
	for barNum = 1, #ActionBars do
		local ButtonName = ActionBars[barNum] .. "Button"
		for i = 1,12,1 do
			local ButtonsOntoBar = ButtonName .. i
			_G[ButtonsOntoBar]:SetPassThroughButtons("Button4", "Button5")
		end
	end
end

The MainMenuBar, for w/e reason, seems to also absorb clicks-- where as MultiBarBottomLeft and Right do not-- so I used SetPassThroughButtons on that, and on the buttons for the first 3 action bars.

1 Like

enableMouse=“true”

<Frame name="MainMenuBar" inherits="EditModeActionBarTemplate" enableMouse="true" parent="UIParent" frameLevel="50" mixin="MainMenuBarMixin">

no enableMouse

<Frame name="MultiBarBottomLeft" inherits="EditModeActionBarTemplate" parent="UIParent" frameStrata="MEDIUM" hidden="true">