WoWInterface (
-   Lua/XML Help (
-   -   How to show children of a hidden frame? (

Lybrial 06-22-19 11:43 AM

How to show children of a hidden frame?

im using the following macro to make sure my player nameplate is always showing but invisible:


/run SetCVar ("nameplateSelfAlpha", 0)
/run SetCVar ("nameplatePersonalShowAlways", 1)

When I now attach a frame to the player nameplate:


-- Attaches frame to the player nameplate
function AttachFrameToPlayerNameplate(frame, forceDetach)
        local namePlatePlayer = C_NamePlate.GetNamePlateForUnit("player");
        if namePlatePlayer and not forceDetach then
                frame:SetPoint("CENTER", namePlatePlayer, "CENTER", 0, 250);
                frame:SetScale(UIParent:GetEffectiveScale()); -- cause personal resource display does not get sacled with UI scale
                -- Default position when player nameplate does not exist
                frame:SetPoint("CENTER", UIParent, "CENTER", 0, -250);

The frame will be invisible too. I have two questions:

First: Is there a way to move the macro code into the lua code?
Second: How can I show the children of a hidden frame?

Fizzlemizz 06-22-19 11:58 AM

First: remove the /run

Second: If you want them to remain shown, why parent them to a frame that might get hidden. A frame doesn't need to be a "child" of another frame to be anchored to it.

Fizzlemizz 06-22-19 12:20 PM

Probably worth pointing out the changes coming to secure frame anchoring in 8.2

Lybrial 06-22-19 12:35 PM

Thx again man. So much I have to learn :D

LudiusMaximus 06-24-19 02:43 PM

Regarding your second question, you are probably looking for SetIgnoreParentAlpha()?

All times are GMT -6. The time now is 10:54 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI