A class that allows you to create a custom style for FlxG.log.advanced()
.
Also used internally for the pre-defined styles.
Static variables
Constructor
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
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.
5.4.0
.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 |
---|