c# - How do I make my XNA game fullscreen while maintaining aspect ratio and centered? -
i haven't been able find tutorials making game fullscreen while maintaining aspect ratio. it's bit difficult me describe in words, i'll show in 2 pictures.
what have:
https://dl.dropbox.com/u/51911679/pictures/whocares/screenshots/whatigot.jpg
what want:
https://dl.dropbox.com/u/51911679/pictures/whocares/screenshots/whatiwant.jpg
the graphicsdevicemanager
class can handle of you:
public game1() { graphics = new graphicsdevicemanager(this); graphics.isfullscreen = true; graphics.preferredbackbufferwidth = 1280; graphics.preferredbackbufferheight = 720; //... }
now, have make sure you're drawing whole screen in spritebatch
coordinates (base them on width & height).
Comments
Post a Comment