C# Class PerformanceMeasuring.GameDebugTools.DebugCommandUI

Command Window class for Debug purpose.
Debug command UI that runs in the Game. You can type commands by keyboard. This works Xbox 360 too. You just need to connect USB keyboard. Also, this debug command works on Windows Phone too. How to Use: 1) Add this component to the game. 2) Register command by RegisterCommand method. 3) Open/Close Debug window by Tab key.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent, IDebugCommandHost
显示文件 Open project: vchelaru/FlatRedBall Class Usage Examples

Public Methods

Method Description
DebugCommandUI ( Microsoft.Xna.Framework.Game game ) : System

Constructor

Draw ( GameTime gameTime ) : void
Echo ( DebugCommandMessage messageType, string text ) : void
Echo ( string text ) : void
EchoError ( string text ) : void
EchoWarning ( string text ) : void
ExecuteCommand ( string command ) : void
Hide ( ) : void

Hide Debug Command window.

Initialize ( ) : void

Initialize component

PopExecutioner ( ) : void
ProcessKeyInputs ( float dt ) : void

Hand keyboard input.

PushExecutioner ( IDebugCommandExecutioner executioner ) : void
RegisterCommand ( string command, string description, DebugCommandExecute callback ) : void
RegisterEchoListner ( IDebugEchoListner listner ) : void
Show ( ) : void

Show Debug Command window.

UnregisterCommand ( string command ) : void
UnregisterEchoListner ( IDebugEchoListner listner ) : void
Update ( GameTime gameTime ) : void

Private Methods

Method Description
IsKeyPressed ( Keys key, float dt ) : bool

Pressing check with key repeating.

Method Details

DebugCommandUI() public method

Constructor
public DebugCommandUI ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
return System

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Echo() public method

public Echo ( DebugCommandMessage messageType, string text ) : void
messageType DebugCommandMessage
text string
return void

Echo() public method

public Echo ( string text ) : void
text string
return void

EchoError() public method

public EchoError ( string text ) : void
text string
return void

EchoWarning() public method

public EchoWarning ( string text ) : void
text string
return void

ExecuteCommand() public method

public ExecuteCommand ( string command ) : void
command string
return void

Hide() public method

Hide Debug Command window.
public Hide ( ) : void
return void

Initialize() public method

Initialize component
public Initialize ( ) : void
return void

PopExecutioner() public method

public PopExecutioner ( ) : void
return void

ProcessKeyInputs() public method

Hand keyboard input.
public ProcessKeyInputs ( float dt ) : void
dt float
return void

PushExecutioner() public method

public PushExecutioner ( IDebugCommandExecutioner executioner ) : void
executioner IDebugCommandExecutioner
return void

RegisterCommand() public method

public RegisterCommand ( string command, string description, DebugCommandExecute callback ) : void
command string
description string
callback DebugCommandExecute
return void

RegisterEchoListner() public method

public RegisterEchoListner ( IDebugEchoListner listner ) : void
listner IDebugEchoListner
return void

Show() public method

Show Debug Command window.
public Show ( ) : void
return void

UnregisterCommand() public method

public UnregisterCommand ( string command ) : void
command string
return void

UnregisterEchoListner() public method

public UnregisterEchoListner ( IDebugEchoListner listner ) : void
listner IDebugEchoListner
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void