Originally Posted by Dreadlorde
Would something like this work?
Code:
local chimaine = CreateFrame("frame",nil,UIParent)
|
Theres no point really you can create a frame using UIParent.
Code:
local tex = UIParent:CreateTexture(entry.name)
tex:SetWidth(entry.width)
tex:SetHeight(entry.height)
I personally wouldn't use a table for none dynamic frames. I would just create a function to set up a texture using args passed to it.
i.e.
Code:
local maketex(name, height, width, ...)
local tex = UIParent:CreateTexture(name)
tex:SetHeight(height)
tex:SetWidth(width)
tex:SetPoint(...)
end
maketex("Cow", 10, 10, "TOPLEFT", UIParent, "BOTTOMRIGHT", -1, 2)
--etc.
I would just like to point out chimaine.SetHeight(entry.height) does not equal chimaine:SetHeight(entry.height) but,
Code:
chimaine:SetHeight(entry.height)
=
Code:
chimaine.SetHeight(chimaine, entry.height)