class flixel.system.debug.Console extends Window

Available on all platforms

A powerful console for the flixel debugger screen with supports custom commands, registering * objects and functions and saves the last 25 commands used. Inspired by Eric Smith's "CoolConsole". * @link http://www.youtube.com/watch?v=QWfpw7elWk8

Instance Fields

var cmdHistory:Array<String>

Reference to the array containing the command history.

var commands:Array<Command>

An array holding all the registered commands.

var objectStack:Array<FlxObject>

Internal helper var containing all the FlxObjects created via the create command.

var registeredFunctions:Map<String, Dynamic>

Hash containing all registered Functions for the call command. You can use the registerFunction() * helper function to register new ones or add them to this Hash directly.

var registeredObjects:Map<String, Dynamic>

Hash containing all registered Obejects for the set command. You can use the registerObject() * helper function to register new ones or add them to this Hash directly.

function new():Void

Creates a new console window object.

function addCommand(Aliases:Array<String>, ProcessFunction:Dynamic, ?Help:String = null, ?ParamHelp:String = null, ?NumParams:Int = 0, ?ParamCutoff:Int = -1):Void

Add a custom command to the console on the debugging screen. * *

Aliases

An array of accepted aliases for this command. *

ProcessFunction

Function to be called with params when the command is entered. *

Help

The description of this command shown in the help command. *

ParamHelp

The description of this command's processFunction's params. *

NumParams

The amount of parameters a function has. Require to prevent crashes on Neko. *

ParamCutoff

At which parameter to put all remaining params into an array

function destroy():Void

Clean up memory.

function registerFunction(FunctionAlias:String, Function:Dynamic):Void

Register a new function to use for the call command. * *

FunctionAlias

The name with which you want to access the function. *

Function

The function to register.

function registerObject(ObjectAlias:String, AnyObject:Dynamic):Void

Register a new object to use for the set command. * *

ObjectAlias

The name with which you want to access the object. *

AnyObject

The object to register.