Thread: XNA using C#
View Single Post
Old 03-26-2008, 04:07 PM   #62 (permalink)
Cloud9_
Registered User
 
Join Date: Jul 2002
Location: Los Angeles California
Posts: 228
+9 Internets
Send a message via ICQ to Cloud9_
this is a method called "GetTileSafeArea", that will return a Rectangle to whatever called it. Usually, you'll call like;
myRectangle = GetTitleSafeArea(insertPercent)

the percent i dont know what its doing since you didn't paste the code for it

this next part actually creates a rectangle. The graphics.GraphicsDevice.Viewport.X is the top of your screen (0 to whatever your resolution is, lets say 800 by 600 is the res, so X could be between 0 and 800)

Y is vertical down your screen from top to bottom,

Width is the width of your viewport
height is the height of your viewport.

Rectangle retval = new Rectangle(graphics.GraphicsDevice.Viewport.X,
graphics.GraphicsDevice.Viewport.Y,
graphics.GraphicsDevice.Viewport.Width,
graphics.GraphicsDevice.Viewport.Height);

basically this rectangle is going to be the entire length and width of your screen... starts in the upper left corner, and goes all the way down to the lower right corner taking up the entire screen
Cloud9_ is offline   Reply With Quote

 
Uberguilds Network