Fix colors

This commit is contained in:
JeremyStar™ 2023-06-29 19:38:43 +02:00
parent 0392cfd147
commit 137ff4675d

View file

@ -31,11 +31,11 @@ func _ready() -> void:
func diag(script:String,message:String,preproc:bool = false) -> void:
if enable and enable_diag:
if preproc:
var logmsg = "[gray](" + script + ") [DIAG] [b]" + preprocessor.pre(0,script,message) + "[/b]"
var logmsg = "[gray](" + script + ") [DIAG] [b]" + preprocessor.pre(0,script,message) + "[/b][/gray]"
print_rich(logmsg)
emit_signal("logevent","DIAG",script,message,logmsg)
else:
var logmsg = "[gray](" + script + ") [DIAG] [b]" + message + "[/b]"
var logmsg = "[gray](" + script + ") [DIAG] [b]" + message + "[/b][/gray]"
print_rich(logmsg)
emit_signal("logevent","DIAG",script,message,logmsg)
@ -53,21 +53,21 @@ func info(script:String,message:String,preproc:bool = true) -> void:
func warn(script:String,message:String,preproc:bool = true) -> void:
if enable:
if preproc:
var logmsg = "[orange](" + script + ") [WARN] [b]" + preprocessor.pre(2,script,message) + "[/b]"
var logmsg = "[orange](" + script + ") [WARN] [b]" + preprocessor.pre(2,script,message) + "[/b][/orange]"
print_rich(logmsg)
emit_signal("logevent","WARN",script,message,logmsg)
else:
var logmsg = "[orange](" + script + ") [WARN] [b]" + message + "[/b]"
var logmsg = "[orange](" + script + ") [WARN] [b]" + message + "[/b][/orange]"
print_rich(logmsg)
emit_signal("logevent","WARN",script,message,logmsg)
func error(script:String,message:String,preproc:bool = true) -> void:
if enable:
if preproc:
var logmsg = "[red](" + script + ") [ERROR] [b]" + preprocessor.pre(3,script,message) + "[/b]"
var logmsg = "[red](" + script + ") [ERROR] [b]" + preprocessor.pre(3,script,message) + "[/b][/red]"
print_rich(logmsg)
emit_signal("logevent","ERROR",script,message,logmsg)
else:
var logmsg = "[red](" + script + ") [ERROR] [b]" + message + "[/b]"
var logmsg = "[red](" + script + ") [ERROR] [b]" + message + "[/b][/red]"
print_rich(logmsg)
emit_signal("logevent","ERROR",script,message,logmsg)