I have on my screen a frame that is sometimes visible and sometimes not (that’s good). It’s not MY frame (it’s from another addon).
I want it as the parent for a frame of my own.
That frame needs to be a) transparent but, b) visible text that I set dynamically, c) be sized to match its parent frame, and d) follow the visibility rules of its parent frame.
There was a time when I could have whipped that out in a minute, but I haven’t coded frames in so long I’ve lost it.
Help?
Child frames will inherit the shown status of the parent but can be hidden independantly
local f = CreaateFrame("Frame", "EhiztarWonderfulFrame", ParentFrame)
f:SetAllPoints() -- size to parent size.
f.Text = f:CreateFontString()
f.Text:SetPoint("CENTER")
f and f.Text will show/hide with ParentFrame unless you f:Hide (and/or f.Text:Hide()) which will keep it permanently hidden.
Bingo. Thanks Fizzy.
Another ADA project.
I want to add the TEXT for SPEC/CLASS to the frames in Battleground Enemies because apparently the playerbase is stuck on stupid interpreting icons (hard to see and map quickly to their meaning) and color (worthless for colorblind people - the in-game settings just make brighter colors, not the right colors).
But I don’t want to alter BGE, just piggyback on top of it.
This is pretty much most of the addon right here except for a little capturing of data.
Update: https://imgur.com/a/KbSdYGe
Those should be accessible by direct reference to the global “BattleGroundEnemies” (I have been doing a CopyTable() of that to my own saved data file via a slash command) right?
In an active battleground I’m not getting a sub-tabled called “BattleGroundEnemies.Enemies.<some random crap>” at all.
Does Frame data not copy like that?
I’m attempting to capture enough information about BGE’s data to piggy back on their frames but with that random node in the middle, I need to be able to iterate over them and if I can’t find them in pairs() iterator, I don’t know how to do it.
Removed part of this and opened a new thread. Different question.