Helper class with lots of utilitiy functions.

Static variables

@:value(["black" => "\x1B[40m", "red" => "\x1B[41m", "green" => "\x1B[42m", "yellow" => "\x1B[43m", "blue" => "\x1B[44m", "magenta" => "\x1B[45m", "cyan" => "\x1B[46m", "grey" => "\x1B[47m", "white" => "\x1B[101m", "default" => "\x1B[0m"])staticansi_colors:Map<String, String> = ["black" => "\x1B[40m", "red" => "\x1B[41m", "green" => "\x1B[42m", "yellow" => "\x1B[43m", "blue" => "\x1B[44m", "magenta" => "\x1B[45m", "cyan" => "\x1B[46m", "grey" => "\x1B[47m", "white" => "\x1B[101m", "default" => "\x1B[0m"]

Simple map that contains useful ansi color strings that can be used when printing to console for nice colors.

See also:

@:value(new Map<String,FlxText>())staticread onlyerrors:Map<String, FlxText> = new Map<String,FlxText>()

Static methods

staticboundTo(value:Float, min:Float, max:Float):Float

staticclearMemory():Void

Clears all assets and other objects from the game's memory.

staticcoolError(message:String, title:String, ?pos:Null<PosInfos>):Void

Funny handler for Application.current.window.alert that doesn't crash on Linux and shit.

Parameters:

message

Message of the error.

title

Title of the error.

@:value({ delimeter : " " })staticcoolTextFileOfArrays(path:String, delimeter:String = " "):Array<Array<String>>

@:value({ ease : "linear" })staticeaseFromString(ease:String = "linear"):EaseFunction

statichaxe_print(value:Dynamic, ?pos_infos:Null<PosInfos>):Void

Used to replace haxe.Log.trace

Parameters:

value

Value to trace.

pos_infos

(Optional) Info about where the trace came from and parameters for it.

staticdynamichaxe_trace(v:Dynamic, ?infos:PosInfos):Void

Access to the old haxe.Log.trace function.

staticmax<T>(nums:Rest<T>):T

Gets the highest number from a list. Shoutout to @crinfarr on Discord.

Parameters:

...nums

Returns:

T

See also:

@:value({ type : LOG })staticmessageFromPrintType(type:PrintType = LOG):String

staticmin<T>(nums:Rest<T>):T

Gets the lowest number from a list. Shoutout to @crinfarr on Discord.

Parameters:

...nums

Returns:

T

See also:

@:value({ min : 0 })staticnumberArray(max:Int, min:Int = 0):Array<Int>

@:has_untyped@:value({ type : LOG })staticprint(message:String, type:PrintType = LOG, ?infos:Null<PosInfos>):Void

Prints the specified message with type and pos_infos.

Parameters:

message

The message to print as a String.

type

(Optional) The type of print (aka, LOG, DEBUG, WARNING, or ERROR) as a PrintType.

pos_infos

(Optional) Info about where the print came from.

staticrgbToHsv(r:Int, g:Int, b:Int):Array<Int>

Converts rgb values into hsv values.

Parameters:

r

The red value

g

The green value

b

The blue value

Returns:

Array

See also:

staticinlinesetWindowIcon(path:String):Void

Sets the window icon

Parameters:

null

path

staticsongExists(song:String, difficulty:String, ?mix:String):Bool