View Single Post
08-03-13, 03:56 AM   #16
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Originally Posted by shurshik View Post
Hi!
Code:
crMapBackground = myframe:CreateTexture(nil,"BACKGROUND")
crMapBackground:SetTexture("Interface\\AddOns\\*\\test_image")
crMapBackground:SetPoint("CENTER",0,0)
how can I make it invisible outside of the frame? Thanks!
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?
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote