A class that allows you to create a custom style for FlxG.log.advanced(). Also used internally for the pre-defined styles.

Static variables

@:value(new LogStyle("> ", "5A96FA", 12, false))staticCONSOLE:LogStyle = new LogStyle("> ", "5A96FA", 12, false)

@:value(new LogStyle("[ERROR] ", "FF8888", 12, false, false, false, "flixel/sounds/beep", true))staticERROR:LogStyle = new LogStyle("[ERROR] ", "FF8888", 12, false, false, false, "flixel/sounds/beep", true)

@:value(new LogStyle())staticNORMAL:LogStyle = new LogStyle()

@:value(new LogStyle("[NOTICE] ", "5CF878", 12, false))staticNOTICE:LogStyle = new LogStyle("[NOTICE] ", "5CF878", 12, false)

@:value(new LogStyle("[WARNING] ", "D9F85C", 12, false, false, false, "flixel/sounds/beep", true))staticWARNING:LogStyle = new LogStyle("[WARNING] ", "D9F85C", 12, false, false, false, "flixel/sounds/beep", true)

Constructor

@:value({ throwException : false, openConsole : false, underlined : false, italic : false, bold : false, size : 12, color : "FFFFFF", prefix : "" })new(prefix:String = "", color:String = "FFFFFF", size:Int = 12, bold:Bool = false, italic:Bool = false, underlined:Bool = false, ?errorSound:String, openConsole:Bool = false, ?callback:() ‑> Void, throwException:Bool = false)

Create a new LogStyle to be used in conjunction with FlxG.log.advanced()

Parameters:

prefix

A prefix which is always attached to the start of the logged data

color

The text color

size

The text size

bold

Whether the text is bold or not

italic

Whether the text is italic or not

underlined

Whether the text is underlined or not

errorSound

A sound to be played when this LogStyle is used

openConsole

Whether the console should be forced to open when this LogStyle is used

callback

A callback function that is called when this LogStyle is used

throwError

Whether an error is thrown when this LogStyle is used

Variables

errorSound:String

A sound to be played when this LogStyle is used

openConsole:Bool

Whether the console should be forced to open when this LogStyle is used

prefix:String

A prefix which is always attached to the start of the logged data

@:value(false)throwException:Bool = false

Whether an exception is thrown when this LogStyle is used. Note: Unlike other log style properties, this happens even in release mode.

Available since

5.4.0

.

callbackFunction:() ‑> Void

A callback function that is called when this LogStyle is used

Methods

inlinetoHtmlString(data:Array<Any>):String

Converts the data into an html log message according to this style.

Parameters:

data

The data being logged

toLogString(data:Array<Any>):String

Converts the data into a log message according to this style.

Parameters:

data

The data being logged