|
-
Aug 9th, 2009, 02:43 PM
#9
Re: Screen Resolution
If you on a 1280x800 surface have a 250x375 frame, then the calculate the proportions like so:
250 / 1280 = 0.195
375 / 800 = 0.469
Now you'd just set the frames width to 0.195 * Me.graphics.GraphicsDevice.ViewPort.Width and the height to 0.469 * Me.graphics.GraphicsDevice.ViewPort.Height.
The X and Y coordinates would be done in the same way:
200 / 1280 = 0.156
200 / 800 = 0.25
Set the X coordinate to 0.156 * Me.graphics.GraphicsDevice.ViewPort.Width and the Y coordinate to 0.25 * Me.graphics.GraphicsDevice.ViewPort.Width.
I think thats the best way of going about it, altough I'm relatively fresh with XNA aswell.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|