Made it possible to compile for html5 (WIP))

This commit is contained in:
NeeEoo
2023-08-19 17:56:22 +02:00
parent 8224293439
commit b184a4825d
10 changed files with 22 additions and 14 deletions
+2
View File
@@ -62,12 +62,14 @@ class NativeAPI {
var bg = cast(backgroundColor, Int);
Windows.setConsoleColors((bg * 16) + fg);
#else
#if sys
Sys.print("\x1b[0m");
if(foregroundColor != NONE)
Sys.print("\x1b[" + Std.int(consoleColorToANSI(foregroundColor)) + "m");
if(backgroundColor != NONE)
Sys.print("\x1b[" + Std.int(consoleColorToANSI(backgroundColor) + 10) + "m");
#end
#end
}
public static function consoleColorToANSI(color:ConsoleColor) {