Originally Posted by Fizzlemizz
Code:
frame.texture = CreateTexture("$parent_Texture")
frame.texture:SetAllPoints(frame)
frame.texture:SetTexture(" ")
|
CreateTexture(), like
CreateFontString(), is a metamethod of frames. As such, you need to call it as
Frame:CreateTexture(). Also, you need to specify a draw layer as the second argument. Names are optional and you can pass
nil as the first argument to not assign one.
The reason why we need Textures and FontStrings to show frames is because they are the visual elements we see. Frames are just a set of coordinates defining a container that we can align Textures and FontStrings to. Some frame types can also react to mouse events within the screen coordinates they cover.