Originally Posted by Malsomnus
I think nobody answered this particular part yet... instead of setting the center point, what I do is:
Code:
crMapBackground:SetAllPoints (myframe)
This way the texture is the exact size and position of your frame (you might actually want to make it smaller if the frame has an edge you want to display). Now it won't be displayed outside the frame and you just have to worry about finding the right coordinates for SetTexCoord.
Also I thought you had to create the texture with:
Code:
crMapBackground = myframe:CreateTexture("Texture","BACKGROUND")
Though if it's been working for you, I guess I'm wrong. Could someone clarify this?
|
Nah, you've confused it with creating a new Frame, where you have to specify the
type of Frame (Frame, Button, StatusBar, etc.). Since there are only, really, two types of layered regions (Textures, FontStrings) and both have their own, independent way of being created, there's no need to specify.
All you're doing when you type "Texture", in the first field of CreateTexture, is naming that Texture...Texture. The XML equivalent would be:
[code]
<Texture name="Texture">
...
</Texture>
[code]