Fix colors

This commit is contained in:
JeremyStar™ 2023-06-29 19:48:05 +02:00
parent 46be02cdcd
commit 0653dc85bc

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][/gray]"
var logmsg = "[color=gray](" + script + ") [DIAG] [b]" + preprocessor.pre(0,script,message) + "[/b][/color]"
print_rich(logmsg)
emit_signal("logevent","DIAG",script,message,logmsg)
else:
var logmsg = "[gray](" + script + ") [DIAG] [b]" + message + "[/b][/gray]"
var logmsg = "[color=gray](" + script + ") [DIAG] [b]" + message + "[/b][/color]"
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][/orange]"
var logmsg = "[color=orange](" + script + ") [WARN] [b]" + preprocessor.pre(2,script,message) + "[/b][/color]"
print_rich(logmsg)
emit_signal("logevent","WARN",script,message,logmsg)
else:
var logmsg = "[orange](" + script + ") [WARN] [b]" + message + "[/b][/orange]"
var logmsg = "[color=orange](" + script + ") [WARN] [b]" + message + "[/b][/color]"
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][/red]"
var logmsg = "[color=red](" + script + ") [ERROR] [b]" + preprocessor.pre(3,script,message) + "[/b][/color]"
print_rich(logmsg)
emit_signal("logevent","ERROR",script,message,logmsg)
else:
var logmsg = "[red](" + script + ") [ERROR] [b]" + message + "[/b][/red]"
var logmsg = "[color=red](" + script + ") [ERROR] [b]" + message + "[/b][/color]"
print_rich(logmsg)
emit_signal("logevent","ERROR",script,message,logmsg)