Thread Tools Display Modes
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
01-09-21, 01:39 PM   #2
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
MinimapCluster is not secure, you don't need all that stuff
  Reply With Quote
01-09-21, 09:39 PM   #3
Cedric
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 4
Originally Posted by Taudier View Post
MinimapCluster is not secure, you don't need all that stuff
I have other things tied to MinimapCluster that need to move with it, and some of those are secure.

We're not talking about the MinimapCluster. I'm not sure what gave you that idea.

Last edited by Cedric : 01-10-21 at 09:29 PM.
  Reply With Quote
01-10-21, 05:24 AM   #4
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
ok

you need to GetFrameRef the UIParent
  Reply With Quote
01-10-21, 05:33 AM   #5
Cedric
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 4
Originally Posted by Taudier View Post
ok

you need to GetFrameRef the UIParent
You misunderstand. MinimapCluster is not involved the parent.

Regardless, forget about MinimapCluster. The question is about moving an actual secure frame.

Even for a non-secure frame, using a state driver to detect the override bar seems like a very simple way to do it.

Last edited by Cedric : 01-10-21 at 09:30 PM.
  Reply With Quote
01-10-21, 05:47 AM   #6
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
whatever, UIParent is defined in the env driver only with GetFrameRef

Even for a non-secure frame, using a state driver to detect the override bar seems like a very simple way to do it.
maybe for you but not for the computer

and this is disgusting because MinimapCluster is not your code and you make it protected by anchoring other frames.

Last edited by Taudier : 01-10-21 at 05:58 AM.
  Reply With Quote
01-10-21, 09:20 PM   #7
Cedric
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 4
Originally Posted by Taudier View Post
whatever, UIParent is defined in the env driver only with GetFrameRef

maybe for you but not for the computer

and this is disgusting because MinimapCluster is not your code and you make it protected by anchoring other frames.
Yeah. Ok. Well, that's just your opinion then. Good talking to you.

I edited the original post in an unlikely-to-succeed attempt to focus you back on the original question.

Last edited by Cedric : 01-10-21 at 09:28 PM.
  Reply With Quote
01-11-21, 05:56 AM   #8
Taudier
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 53
it's not "an opinion" it's a fact

same answer
ok

you need to GetFrameRef the UIParent
you may also want to try the conditional macro "vehicleui"

Last edited by Taudier : 01-11-21 at 06:15 AM.
  Reply With Quote

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

Thread Tools
Display Modes

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