Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to display a rocket in the middle of the screen.
The problem is if I set a fixed value for width and height(eg. width=600,height=800),the rocket will appear in centre for some computers and not for other computers of different resolution.How can I enter code to get the screen rosultion of the computer so that the rocket is displayed in the centre of every computer?( eg width=(screen width)/2 height=(screen height)/2 )
Posted

1 solution

Here: http://stackoverflow.com/questions/1377524/xna-get-screens-width-and-height[^].

And please pay attention for the words written by the authors of the answer: "just googled for "xna screen width height" myself". Maybe it will give you some useful idea. :-)

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900