Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MB2D.MBConsole Class Reference

Midnight Blue debug console class. Executes attached methods and changes attached variables. More...

Collaboration diagram for MB2D.MBConsole:
Collaboration graph

Public Member Functions

 MBConsole (Color bgColor, Color txtColor, SpriteFont font)
 Initializes a new instance of the T:MidnightBlue.MBConsole class. More...
 
void InitWindow (GraphicsDevice graphics)
 Initializes a graphics target to render the console to More...
 
void AddFunc (string name, Action< string[]> func)
 Adds a new function to the console for executing in game More...
 
void AddVar (string name, object variable)
 Adds a new variable to the console for altering in game More...
 
void Update ()
 Updates any animation until no longer in an animation state. Otherwise calls ProcessInput() More...
 
void Draw (SpriteBatch spriteBatch)
 Draws the console and associated text to the attached window More...
 
void Write (string line)
 Writes a line to the console to display More...
 
void Write (string line, params string[] args)
 Writes a line to the console to display with specified string format information. More...
 
void Write (string line, params object[] args)
 Writes a line to the console to display with specified string format information. More...
 
void Debug (string line, params object[] args)
 Writes a debug line to the console with the specified string format information More...
 
void Debug (int line, params object[] args)
 Writes a debug line to the console with the specified string format information More...
 
void Debug (uint line, params object[] args)
 Writes a debug line to the console with the specified string format information More...
 
void Debug (float line, params object[] args)
 Writes a debug line to the console with the specified string format information More...
 
void Toggle ()
 Toggles the display/hide state of the console More...
 

Properties

bool Display [get, set]
 Determines if the console is currently shown or hidden More...
 
Color BGColor [get]
 Gets the background color of the console More...
 
Color TextColor [get]
 Gets the color of the console text. More...
 
Dictionary< string, object > Vars [get]
 Gets the consoles game variables. More...
 
Dictionary< string, Action< string[]> > Funcs [get]
 Gets the consoles game functions. More...
 
string LastOutput [get]
 

Detailed Description

Midnight Blue debug console class. Executes attached methods and changes attached variables.

Constructor & Destructor Documentation

§ MBConsole()

MB2D.MBConsole.MBConsole ( Color  bgColor,
Color  txtColor,
SpriteFont  font 
)
inline

Initializes a new instance of the T:MidnightBlue.MBConsole class.

Parameters
bgColorBackground color for rendering the console
txtColorText color

Member Function Documentation

§ AddFunc()

void MB2D.MBConsole.AddFunc ( string  name,
Action< string[]>  func 
)
inline

Adds a new function to the console for executing in game

Parameters
nameName to use when calling the function in game
funcFunction to attach
Here is the caller graph for this function:

§ AddVar()

void MB2D.MBConsole.AddVar ( string  name,
object  variable 
)
inline

Adds a new variable to the console for altering in game

Parameters
nameName to use when altering the variable in game
variableVariable to attach
Here is the caller graph for this function:

§ Debug() [1/4]

void MB2D.MBConsole.Debug ( string  line,
params object []  args 
)
inline

Writes a debug line to the console with the specified string format information

Parameters
lineLine to write
argsArguments to format into string
Here is the call graph for this function:
Here is the caller graph for this function:

§ Debug() [2/4]

void MB2D.MBConsole.Debug ( int  line,
params object []  args 
)
inline

Writes a debug line to the console with the specified string format information

Parameters
lineLine to write
argsArguments to format into string
Here is the call graph for this function:

§ Debug() [3/4]

void MB2D.MBConsole.Debug ( uint  line,
params object []  args 
)
inline

Writes a debug line to the console with the specified string format information

Parameters
lineLine to write
argsArguments to format into string
Here is the call graph for this function:

§ Debug() [4/4]

void MB2D.MBConsole.Debug ( float  line,
params object []  args 
)
inline

Writes a debug line to the console with the specified string format information

Parameters
lineLine to write
argsArguments to format into string
Here is the call graph for this function:

§ Draw()

void MB2D.MBConsole.Draw ( SpriteBatch  spriteBatch)
inline

Draws the console and associated text to the attached window

Here is the caller graph for this function:

§ InitWindow()

void MB2D.MBConsole.InitWindow ( GraphicsDevice  graphics)
inline

Initializes a graphics target to render the console to

Parameters
graphicsGraphicsDevice to use for rendering
Here is the caller graph for this function:

§ Toggle()

void MB2D.MBConsole.Toggle ( )
inline

Toggles the display/hide state of the console

Here is the caller graph for this function:

§ Update()

void MB2D.MBConsole.Update ( )
inline

Updates any animation until no longer in an animation state. Otherwise calls ProcessInput()

Here is the caller graph for this function:

§ Write() [1/3]

void MB2D.MBConsole.Write ( string  line)
inline

Writes a line to the console to display

Parameters
lineLine to write
Here is the caller graph for this function:

§ Write() [2/3]

void MB2D.MBConsole.Write ( string  line,
params string []  args 
)
inline

Writes a line to the console to display with specified string format information.

Parameters
lineLine to write
argsArguments to add to string format
Here is the call graph for this function:

§ Write() [3/3]

void MB2D.MBConsole.Write ( string  line,
params object []  args 
)
inline

Writes a line to the console to display with specified string format information.

Parameters
lineLine to write
argsArguments to format into a string
Here is the call graph for this function:

Property Documentation

§ BGColor

Color MB2D.MBConsole.BGColor
get

Gets the background color of the console

The background color.

§ Display

bool MB2D.MBConsole.Display
getset

Determines if the console is currently shown or hidden

true if shown; otherwise, false.

§ Funcs

Dictionary<string, Action<string[]> > MB2D.MBConsole.Funcs
get

Gets the consoles game functions.

The functions.

§ TextColor

Color MB2D.MBConsole.TextColor
get

Gets the color of the console text.

The color of the text.

§ Vars

Dictionary<string, object> MB2D.MBConsole.Vars
get

Gets the consoles game variables.

The variables.


The documentation for this class was generated from the following file: