Creating a button in XNA

In Win form,WPF of ASP.NET application you can drag a button to design area and double click and
write code the button click event.
But in XNA you can`t do that.
there no such thing as button in XNA.You need to create your own button that work as
windows button.

First you need to create a image of a button.
and also you need to create another image for highlight.
Also you need a image for mouse cursor.

than you can load that content to the project.

then you need to write the code to image.

you can download the Source code from-

http://code.msdn.microsoft.com/XNAButton

btn

Leave a Reply