View Single Post
08-26-18, 02:30 AM   #16
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
Originally Posted by Drudatz View Post
Okay with Taudiers tip it works now
(even though I HAVE MultiBarRight enabled and visible).
I just react on PLAYER_CONTROL_GAINED and it works again.

Code:
		if event:match("PLAYER_CONTROL_GAINED") then
			CreateFrame("frame", nil, nil, "SecureHandlerBaseTemplate" ):WrapScript(ActionButton1, "OnShow", [[
				print("ACTION!")
				local MainMenuBarArtFrame = self:GetParent()
				local MainMenuBar = MainMenuBarArtFrame:GetParent()
				local UIParent = MainMenuBar:GetParent()
				MainMenuBar:SetPoint("CENTER", UIParent, "BOTTOM", 0, 40)
			]])
		end
it doesn't work only with the Bottom MultiBarRight. For the other bars it works fine. Your code is wrong, primarily because you can't create a SecureFrame ("SecureHandlerBaseTemplate") in combat. Why do you need to react on "PLAYER_CONTROL_GAINED" ? When you exit a vehicule it triggers MainMenuBar "OnShow". Any scenario where it didn't work ?
  Reply With Quote