WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Moving secure frames in combat (https://www.wowinterface.com/forums/showthread.php?t=58537)

Cedric 01-09-21 09:55 AM

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


Taudier 01-09-21 01:39 PM

MinimapCluster is not secure, you don't need all that stuff

Cedric 01-09-21 09:39 PM

Quote:

Originally Posted by Taudier (Post 338238)
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.

Taudier 01-10-21 05:24 AM

ok

you need to GetFrameRef the UIParent

Cedric 01-10-21 05:33 AM

Quote:

Originally Posted by Taudier (Post 338247)
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.

Taudier 01-10-21 05:47 AM

whatever, UIParent is defined in the env driver only with GetFrameRef

Quote:

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.

Cedric 01-10-21 09:20 PM

Quote:

Originally Posted by Taudier (Post 338250)
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.

Taudier 01-11-21 05:56 AM

it's not "an opinion" it's a fact

same answer
Quote:

ok

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


All times are GMT -6. The time now is 02:30 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI