Hello! So i am wondering how i can target the subframe that lies within a mainframe? I am making a group box sort of where the main window is just the window where the group members lies inside.
This is how it looks:
https://gyazo.com/1bf04b61fb48f560429fadf1f944f10e
How can i target the frame with the name "Lwarlock"?
How my code is built
Lua Code:
local mainWindow = CreateFrame("Frame", "DragFrame", UIParent) -- The main window (Orange color)
local subFrame = CreateFrame("Frame", "SUBFRAME", UIParent)
local texture = subFrame:CreateTexture("ARTWORK")
local fontString = subFrame:CreateFontString(nil. "OVERLAY", "GameFontNormal")
subFrame:SetPoint("TOP", mainWindow, "TOP", 0,0)
A general way how the code looks. That is the way i add the subframe to the main frame anyways. Sub frames are going to be added and removed left and right in this program so this is why i cant use a frame:SetScript("OnMouseDown") event. That is what i think atleast, i have this subframe creation code inside a function that will be called pretty often so! Any tips? Kind Regards