Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-14-20, 10:36 PM   #1
Yakkers
A Deviate Faerie Dragon
Join Date: May 2020
Posts: 10
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:

Code:
local frame = CreateFrame("Frame", "HitComboPopups_Frame", NamePlatePlayerResourceFrame)
frame:SetPoint("CENTER", NamePlatePlayerResourceFrame, "CENTER", 0, -150)
frame:SetFrameStrata("HIGH")
frame:SetWidth(popupSize)
frame:SetHeight(popupSize)
frame:Hide()

local texture = frame:CreateTexture()
texture:SetWidth(frame:GetWidth())
texture:SetHeight(frame:GetHeight())
texture:SetAllPoints(frame)

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!
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Trying to anchor a frame to the personal resource display

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