mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-30 11:17:07 -04:00
home scene
This commit is contained in:
parent
5fe170dfc6
commit
cce0bedbb1
21 changed files with 559 additions and 131 deletions
26
app/scripts/debug_log/debug.gd
Normal file
26
app/scripts/debug_log/debug.gd
Normal file
|
@ -0,0 +1,26 @@
|
|||
extends Node
|
||||
|
||||
signal logged(msg: String)
|
||||
signal error(msg: String)
|
||||
|
||||
const ERROR_CLR = Color.RED
|
||||
const WARN_CLR = Color.YELLOW
|
||||
const SILENT_CLR = Color.DIM_GRAY
|
||||
|
||||
|
||||
func logr(msg: Variant) -> void:
|
||||
print_rich(str(msg))
|
||||
logged.emit(str(msg))
|
||||
|
||||
|
||||
func logerr(msg: Variant) -> void:
|
||||
printerr(str(msg))
|
||||
var rich_clr = "[color=%s]%s[/color]" % [Color.RED.to_html(), str(msg)]
|
||||
logged.emit(rich_clr)
|
||||
error.emit(msg)
|
||||
|
||||
|
||||
func logclr(msg: Variant, color: Color) -> void:
|
||||
var rich_clr = "[color=%s]%s[/color]" % [color.to_html(), str(msg)]
|
||||
print_rich(rich_clr)
|
||||
logged.emit(rich_clr)
|
Loading…
Add table
Add a link
Reference in a new issue