Originally Posted by Drudatz
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 ?