Trying to anchor a frame to the personal resource display
I'm very new to addon development and I'm working on a simple addon for myself to use. Basically I'm just doing the kind of things I do with weakauras, but I want to do some more hardcoded animation stuff that weakauras doesn't really support so I figured it was time to finally start learning how to make standalone addons.
Anyways, most of my weakauras stuff is anchored to the personal resource display, but trying to do that in lua with a custom frame doesn't seem to be doing anything at all.
Here's my code setting up the texture:
I got "NamePlatePlayerResourceFrame" from another thread, it doesn't seem to be anywhere in the either wowprogramming or the wiki's documentation. print(NamePlatePlayerResourceFrame) just spits out nil, so I it just falls back on UIParent.
So, what's the proper way to attach a frame to the personal resource display so it moves with it and fades in and out with it? I tried to dig through weakauras' code to see how they did it, but I really couldn't make heads or tails of it. I'm not sure if this NamePlatePlayerResourceFrame identifier is even still current, the threads I saw it in were fairly old.
Thanks in advance!
You can use /fstack in-game and mouseover the frame to get its name. However, the personal resource frame is a custom nameplate and I believe is treated like a friendly nameplate, which can't be altered or anchored to in instances.
Mousing over the PRD with /fstack gives me this:
I tried using both NamePlate1UnitFrame and NamePlate1 as a parent, but both of those still result in a nil parent for my frame. Printing NamePlate1UnitFrame or NamePlate1 gives me a hex string instead of nil though, so that's a start.
Is there something specific I need to do to fetch a frame from its name or something? It's hard to know exactly what I'm looking for when dealing with dynamically-typed languages.
Sorry for double post, but I got it! For anyone else's future reference, here's a quick and dirty way to do it:
I tested with an aoe hit while not targeting the mob (so the PRD isn't already visible) on a fresh reaload and it still works, so it should be golden in this case.
|All times are GMT -6. The time now is 03:25 PM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI