Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-09-21, 09:55 AM   #1
Cedric
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 4
Moving secure frames in combat

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")

Last edited by Cedric : 01-10-21 at 09:27 PM. Reason: To avoid triggering a certain person.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Moving secure frames in combat


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