summaryrefslogtreecommitdiff
path: root/editor/script_editor_debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r--editor/script_editor_debugger.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index fee67df9c9..d1ad503542 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -306,8 +306,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String error = p_data[1];
step->set_disabled(!can_continue);
next->set_disabled(!can_continue);
- reason->set_text(error);
- reason->set_tooltip(error);
+ _set_reason_text(error, MESSAGE_ERROR);
breaked = true;
dobreak->set_disabled(true);
docontinue->set_disabled(false);
@@ -761,6 +760,21 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
}
}
+void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType p_type) {
+ switch (p_type) {
+ case MESSAGE_ERROR:
+ reason->add_color_override("font_color", get_color("error_color", "Editor"));
+ break;
+ case MESSAGE_WARNING:
+ reason->add_color_override("font_color", get_color("warning_color", "Editor"));
+ break;
+ default:
+ reason->add_color_override("font_color", get_color("success_color", "Editor"));
+ }
+ reason->set_text(p_reason);
+ reason->set_tooltip(p_reason);
+}
+
void ScriptEditorDebugger::_performance_select(Object *, int, bool) {
perf_draw->update();
@@ -921,8 +935,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
dobreak->set_disabled(false);
tabs->set_current_tab(0);
- reason->set_text(TTR("Child Process Connected"));
- reason->set_tooltip(TTR("Child Process Connected"));
+ _set_reason_text(TTR("Child Process Connected"), MESSAGE_SUCCESS);
profiler->clear();
inspect_scene_tree->clear();