Quantcast
WoWInterface - View Single Post - Overlapping NineSlice textures with ButtonFrameTemplate
View Single Post
03-28-20, 06:26 PM   #7
Vrul
An Onyxian Warder
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 361
For your example you would use:
Code:
myFrame.NineSlice.TopRightCorner:SetTexture("Interface\\FrameGeneral\\UIFrameMetal")
myFrame.NineSlice.TopRightCorner:SetTexCoord(0/512, 133/512, 269/512, 401/512)
I found the coords to be (0/512, 133/512, 282/512, 401/512) based on pixels but they seem to use a bit of extra white space at the top so I just kept tweaking the third argument (which is the top) until I arrived at a good fit.

Note that I left all arguments in the form pixelPos/dimensionSize to make it easier to understand (I hope).
  Reply With Quote