From 137ff4675d0032db2dc5adcff9665d83bb8f388f Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 29 Jun 2023 19:38:43 +0200 Subject: [PATCH] Fix colors --- logger.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/logger.gd b/logger.gd index 96b3f0c..bd6d115 100644 --- a/logger.gd +++ b/logger.gd @@ -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)