I have moved the one of Blizzard's secure frames (that is definitely
NOT the Minimap) to the center of my screen, at the bottom so it's between my two sets of action buttons. The problem is that the vehicle override bar covers up the
Minimap secure frame when it rises from the top. I set out to find a way to move this secure frame
Minimap during combat (e.g. in Ulduar) when the vehicle ui appears. It seems to work, but I want to know if I'm doing this the right way. Any thoughts?
Code:
-- create a state driver to securely move BlizzardSecureFrame when vehicle entered/exited
local driver = CreateFrame("Frame",nil,nil,"SecureHandlerStateTemplate")
driver:SetFrameRef("BlizzardSecureFrame",BlizzardSecureFrame)
driver:SetFrameRef("UIParent",UIParent)
driver:SetAttribute("_onstate-invehicle",[[
local frame = self:GetFrameRef("BlizzardSecureFrame")
frame:ClearAllPoints()
if newstate=="true" then
frame:SetPoint("BOTTOM", UIParent, "BOTTOM", -9, 85)
else
frame:SetPoint("BOTTOM", UIParent, "BOTTOM", -9, 42)
end
]])
RegisterStateDriver(driver,"invehicle", "[overridebar] true; [possessbar] true; false")