mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-23 17:17:31 -04:00
debug log
This commit is contained in:
parent
48feba5041
commit
7348f2b9d5
3 changed files with 8 additions and 6 deletions
|
@ -18,3 +18,5 @@ func logclr(msg, color: Color) -> void:
|
|||
var rich_clr = "[color=%s]%s[/color]" % [color.to_html(), str(msg)]
|
||||
print_rich(rich_clr)
|
||||
logged.emit(rich_clr)
|
||||
|
||||
# TODO: log category with defined color
|
||||
|
|
|
@ -14,17 +14,17 @@ func _physics_process(_delta: float) -> void:
|
|||
|
||||
|
||||
func _execute_function(command: Command) -> Variant:
|
||||
print("Recieved command: " + command.name)
|
||||
Debug.logclr("Recieved command: " + command.name, Color.SANDY_BROWN)
|
||||
match command.name:
|
||||
"send_filehandle":
|
||||
command_events.send_filehandle_emit()
|
||||
"set_mouse_mode":
|
||||
if command.args.size() != 1: push_error("Arg count should be 1"); return ""
|
||||
if command.args.size() != 1: Debug.logerr("Arg count should be 1"); return ""
|
||||
command_events.set_mouse_mode_emit(command.args[0])
|
||||
"open_gate":
|
||||
if command.args.size() != 1: push_error("Arg count should be 1"); return ""
|
||||
if command.args.size() != 1: Debug.logerr("Arg count should be 1"); return ""
|
||||
var url = Url.join(gate_events.current_gate_url, command.args[0])
|
||||
gate_events.open_gate_emit(url)
|
||||
_:
|
||||
print("Command %s not implemented" % [command.name])
|
||||
Debug.logerr("Command %s not implemented" % [command.name])
|
||||
return ""
|
||||
|
|
|
@ -54,12 +54,12 @@ func create_external_texture() -> void:
|
|||
|
||||
|
||||
func send_filehandle() -> void:
|
||||
print("Sending send_filehandle...")
|
||||
Debug.logr("Sending send_filehandle...")
|
||||
var sent = false
|
||||
while not sent:
|
||||
sent = ext_texure.send_filehandle(fd_path)
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
print("fd was sent")
|
||||
Debug.logr("filehandle was sent")
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue