Game Development Reference
In-Depth Information
Figure 10-13. The rounded corner of the default background texture
So how is it that the original texture was not stretched? The Border parameter is set to 4 and 4 for
the Left and Right. This is commonly called “slice 9,” as it divides an image into 9 sections where the
corners are retained and the center sections are stretched. The imported button textures are both
64 x 64, so the Border should be half that size.
1.
Set the Border Left and Right values to 32 each.
The buttons round out correctly while allowing the button to stretch to the rectangles' dimensions
(Figure 10-14 ).
Figure 10-14. The button textures with the correct Border offset; the right button shows the hover color
2.
Try clicking the button.
The Active state also requires the new orange texture for its background, but you can leave the Text
Color as white.
 
Search WWH ::




Custom Search