XnaConsole

Provides a basic XNA replacement for the .NET Console class. Useful for debugging and testing, but not really meant to be used in a production game.

Fields / Properties

public static int Spacer = 2
Allows you to set the amount of space, in pixels, left between each line.

public static SpriteFont Font
Allows you to set the font for the console. You must define this before using the class.

public static Rectangle? OutputArea = null
Allows you to set the location where the console will be shown. If left as null, the current title safe area will be used.

Methods

public static void Clear()
Clears all text from the console.

public static void WriteLine(object message)
public static void WriteLine(string message)
public static void WriteLine(string format, params object[] args)
Adds a new line to the console.

public static void Draw(GraphicsDeviceManager graphics, SpriteBatch batch)
Draws the output of the console to the screen. Must be called in your game's Draw method.

Last edited Oct 24, 2009 at 7:21 PM by dylanwolf, version 1

Comments

No comments yet.