Controller Button Images

This utility provides individual images representing each element on the Xbox 360 Controller, as well as an image ready for the Sprite Font system provided in the XNA Framework.

Using an Image as a Sprite Font

Using the single button images is straightforward. The file name indicates which button can be found in which image. You can use the provided "strip" image in the Sprite Font system. This allows you to use the images without managing indiviual Texture2D objects.

When you add xboxControllerSpriteFont.tga to your XNA Game Studio Express project, it defaults to using the Texture - XNA Framework content importer, and the Texture (Sprite, 32bpp) - XNA Framework content processor. (You can find these settings in the Visual Studio properties pane after selecting the font in Solution Explorer.) This default importer is fine, but you will need to change the processor to "Sprite Font Texture - XNA Framework". Build your project, and the ContentManager will be ready to load your custom SpriteFont.

When you use the SpriteFont object, you need to specify the text that the font will draw. The glyphs processed by the "Sprite Font Texture - XNA Framework" are associated with characters starting with Space, and incrementing from there.

Character Mapping

Character Image
Space Left Thumbstick
! Directional Pad
" Right Thumbstick
# BACK
$ Guide
% START
& X
' A
( Y
) B
* Right Shoulder
+ Right Trigger
, Left Trigger
- Left Shoulder