diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-06-28 23:35:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 23:35:53 +0200 |
commit | b730d2ee09a8fdc4eaa44efe9afc083d907f80c3 (patch) | |
tree | 0ed1a5563e639656ccc63749a2f53add1733965d /core/debugger/remote_debugger.cpp | |
parent | 0cd049e4112ab8d4ee2ebd6869d114bdf754c3bb (diff) | |
parent | c6291bcd8a49055ce2158f88759a487de5b8d1bd (diff) | |
download | redot-engine-b730d2ee09a8fdc4eaa44efe9afc083d907f80c3.tar.gz |
Merge pull request #60675 from voylin/Add-BBCode-support-for-printing-output
Adding print_rich() for printing with BBCode
Diffstat (limited to 'core/debugger/remote_debugger.cpp')
-rw-r--r-- | core/debugger/remote_debugger.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 5ee4e2c368..508a71ece9 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -208,7 +208,7 @@ void RemoteDebugger::_err_handler(void *p_this, const char *p_func, const char * rd->script_debugger->send_error(String::utf8(p_func), String::utf8(p_file), p_line, String::utf8(p_err), String::utf8(p_descr), p_editor_notify, p_type, si); } -void RemoteDebugger::_print_handler(void *p_this, const String &p_string, bool p_error) { +void RemoteDebugger::_print_handler(void *p_this, const String &p_string, bool p_error, bool p_rich) { RemoteDebugger *rd = static_cast<RemoteDebugger *>(p_this); if (rd->flushing && Thread::get_caller_id() == rd->flush_thread) { // Can't handle recursive prints during flush. @@ -237,7 +237,13 @@ void RemoteDebugger::_print_handler(void *p_this, const String &p_string, bool p OutputString output_string; output_string.message = s; - output_string.type = p_error ? MESSAGE_TYPE_ERROR : MESSAGE_TYPE_LOG; + if (p_error) { + output_string.type = MESSAGE_TYPE_ERROR; + } else if (p_rich) { + output_string.type = MESSAGE_TYPE_LOG_RICH; + } else { + output_string.type = MESSAGE_TYPE_LOG; + } rd->output_strings.push_back(output_string); if (overflowed) { |