alphabet!!
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package funkin.system;
|
||||
|
||||
import flixel.system.debug.log.LogStyle;
|
||||
import flixel.system.frontEnds.LogFrontEnd;
|
||||
import haxe.Log;
|
||||
import funkin.windows.WindowsAPI;
|
||||
import funkin.windows.WindowsAPI.ConsoleColor;
|
||||
@@ -18,6 +20,26 @@ class Logs {
|
||||
logText(Std.string(v))
|
||||
], TRACE));
|
||||
};
|
||||
|
||||
LogFrontEnd.onLogs = function(Data, Style, FireOnce) {
|
||||
var prefix = "[FLIXEL]";
|
||||
var color:ConsoleColor = LIGHTGRAY;
|
||||
var level:Level = INFO;
|
||||
if (Style == LogStyle.CONSOLE) {prefix = "> "; color = WHITE; level = INFO; }
|
||||
if (Style == LogStyle.ERROR) {prefix = "[FLIXEL ERROR]"; color = RED; level = ERROR; }
|
||||
if (Style == LogStyle.NORMAL) {prefix = "[FLIXEL]"; color = WHITE; level = INFO; }
|
||||
if (Style == LogStyle.NOTICE) {prefix = "[FLIXEL NOTICE]"; color = GREEN; level = WARNING;}
|
||||
if (Style == LogStyle.WARNING) {prefix = "[FLIXEL WARNING]"; color = YELLOW; level = WARNING;}
|
||||
|
||||
var d:Dynamic = Data;
|
||||
if (!(d is Array))
|
||||
d = [d];
|
||||
var a:Array<Dynamic> = d;
|
||||
var strs = [for(e in a) Std.string(e)];
|
||||
for(e in strs) {
|
||||
Logs.trace('$prefix $e', level, color);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static function prepareColoredTrace(text:Array<LogText>, level:Level = INFO) {
|
||||
|
||||
Reference in New Issue
Block a user