diff options
Diffstat (limited to 'editor/debugger')
-rw-r--r-- | editor/debugger/editor_profiler.cpp | 2 | ||||
-rw-r--r-- | editor/debugger/editor_visual_profiler.cpp | 2 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 30 |
3 files changed, 29 insertions, 5 deletions
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index 1577e24ac0..c7d4e9128a 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -136,7 +136,7 @@ Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) c double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF)); Color c; c.set_hsv(rot, bc.get_s(), bc.get_v()); - return c.linear_interpolate(get_theme_color("base_color", "Editor"), 0.07); + return c.lerp(get_theme_color("base_color", "Editor"), 0.07); } void EditorProfiler::_item_edited() { diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index d2edba5970..7d2822b1c9 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -132,7 +132,7 @@ Color EditorVisualProfiler::_get_color_from_signature(const StringName &p_signat double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF)); Color c; c.set_hsv(rot, bc.get_s(), bc.get_v()); - return c.linear_interpolate(get_theme_color("base_color", "Editor"), 0.07); + return c.lerp(get_theme_color("base_color", "Editor"), 0.07); } void EditorVisualProfiler::_item_selected() { diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 81a7d85b18..152989f90b 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -31,6 +31,7 @@ #include "script_editor_debugger.h" #include "core/debugger/debugger_marshalls.h" +#include "core/debugger/remote_debugger.h" #include "core/io/marshalls.h" #include "core/project_settings.h" #include "core/ustring.h" @@ -396,10 +397,33 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da inspector->add_stack_variable(p_data); } else if (p_msg == "output") { - ERR_FAIL_COND(p_data.size() < 1); + ERR_FAIL_COND(p_data.size() != 2); + ERR_FAIL_COND(p_data[0].get_type() != Variant::PACKED_STRING_ARRAY); - Vector<String> strings = p_data[0]; - EditorNode::get_log()->add_message(String("\n").join(strings)); + Vector<String> output_strings = p_data[0]; + + ERR_FAIL_COND(p_data[1].get_type() != Variant::PACKED_INT32_ARRAY); + Vector<int> output_types = p_data[1]; + + ERR_FAIL_COND(output_strings.size() != output_types.size()); + + for (int i = 0; i < output_strings.size(); i++) { + RemoteDebugger::MessageType type = (RemoteDebugger::MessageType)(int)(output_types[i]); + EditorLog::MessageType msg_type; + switch (type) { + case RemoteDebugger::MESSAGE_TYPE_LOG: { + msg_type = EditorLog::MSG_TYPE_STD; + } break; + case RemoteDebugger::MESSAGE_TYPE_ERROR: { + msg_type = EditorLog::MSG_TYPE_ERROR; + } break; + default: { + WARN_PRINT("Unhandled script debugger message type: " + itos(type)); + msg_type = EditorLog::MSG_TYPE_STD; + } break; + } + EditorNode::get_log()->add_message(output_strings[i], msg_type); + } } else if (p_msg == "performance:profile_frame") { Vector<float> p; p.resize(p_data.size()); |