From 0653dc85bc663cf6b361bf9b89be9318cacd0ad3 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 29 Jun 2023 19:48:05 +0200 Subject: [PATCH] Fix colors --- logger.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/logger.gd b/logger.gd index bd6d115..8c2b063 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][/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)