View Single Post
07/27/15, 04:11 PM   #11
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by votan View Post
I guess, AnchorFill aligns the control, but TextureCoords aligns the texture to 62.5% of "bottom" == height of control. But I just guess.
You're right, texture coordinates are numbers between 0 and 1 from the left to the right and from the top to the bottom.

It is used for example if you have set of icons on the same texture - something like this:


If your control should show just the green part of the texture, you will use coordinates:
XML Code:
  1. <TextureCoords left="0" right="0.5" top="0" bottom="0.5" />
If you want to show yellow part, use:
XML Code:
  1. <TextureCoords left="0.5" right="1" top="0.5" bottom="1" />
  Reply With Quote