summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/code_editor.cpp8
-rw-r--r--editor/code_editor.h2
-rw-r--r--editor/editor_settings.cpp1
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp36
-rw-r--r--editor/plugins/script_editor_plugin.h4
-rw-r--r--editor/plugins/script_text_editor.cpp10
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--editor/plugins/text_editor.cpp11
-rw-r--r--editor/plugins/text_editor.h2
-rw-r--r--editor/script_editor_debugger.cpp20
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp8
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--scene/gui/text_edit.cpp33
-rw-r--r--scene/gui/text_edit.h6
-rw-r--r--scene/resources/default_theme/default_theme.cpp1
18 files changed, 152 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index a9ec776693..d655f52f5d 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1177,6 +1177,14 @@ void CodeTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
text_editor->select(p_line, p_begin, p_line, p_end);
}
+void CodeTextEditor::set_executing_line(int p_line) {
+ text_editor->set_executing_line(p_line);
+}
+
+void CodeTextEditor::clear_executing_line() {
+ text_editor->clear_executing_line();
+}
+
Variant CodeTextEditor::get_edit_state() {
Dictionary state;
diff --git a/editor/code_editor.h b/editor/code_editor.h
index e3dbfe1ce0..b98af377ce 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -217,6 +217,8 @@ public:
void goto_line(int p_line);
void goto_line_selection(int p_line, int p_begin, int p_end);
+ void set_executing_line(int p_line);
+ void clear_executing_line();
Variant get_edit_state();
void set_edit_state(const Variant &p_state);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 54bd9cae20..bf582ca004 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -645,6 +645,7 @@ void EditorSettings::_load_default_text_editor_theme() {
_initial_set("text_editor/highlighting/member_variable_color", Color::html("e64e59"));
_initial_set("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
_initial_set("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
+ _initial_set("text_editor/highlighting/executing_line_color", Color(0.2, 0.8, 0.2, 0.4));
_initial_set("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
_initial_set("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
_initial_set("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 2e9c664108..b8dd29cecc 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1116,6 +1116,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color member_variable_color = main_color.linear_interpolate(mono_color, 0.6);
const Color mark_color = Color(error_color.r, error_color.g, error_color.b, 0.3);
const Color breakpoint_color = error_color;
+ const Color executing_line_color = Color(0.2, 0.8, 0.2, 0.4);
const Color code_folding_color = alpha3;
const Color search_result_color = alpha1;
const Color search_result_border_color = alpha3;
@@ -1151,6 +1152,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
setting->set_initial_value("text_editor/highlighting/member_variable_color", member_variable_color, true);
setting->set_initial_value("text_editor/highlighting/mark_color", mark_color, true);
setting->set_initial_value("text_editor/highlighting/breakpoint_color", breakpoint_color, true);
+ setting->set_initial_value("text_editor/highlighting/executing_line_color", executing_line_color, true);
setting->set_initial_value("text_editor/highlighting/code_folding_color", code_folding_color, true);
setting->set_initial_value("text_editor/highlighting/search_result_color", search_result_color, true);
setting->set_initial_value("text_editor/highlighting/search_result_border_color", search_result_border_color, true);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 03287b8cf9..d84a5a1e48 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -312,6 +312,38 @@ void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
}
}
+void ScriptEditor::_set_execution(REF p_script, int p_line) {
+ Ref<Script> script = Object::cast_to<Script>(*p_script);
+ if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ for (int i = 0; i < tab_container->get_child_count(); i++) {
+
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
+ if (!se)
+ continue;
+
+ if ((script != NULL && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
+ se->set_executing_line(p_line);
+ }
+ }
+ }
+}
+
+void ScriptEditor::_clear_execution(REF p_script) {
+ Ref<Script> script = Object::cast_to<Script>(*p_script);
+ if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ for (int i = 0; i < tab_container->get_child_count(); i++) {
+
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
+ if (!se)
+ continue;
+
+ if ((script != NULL && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
+ se->clear_executing_line();
+ }
+ }
+ }
+}
+
ScriptEditorBase *ScriptEditor::_get_current_editor() const {
int selected = tab_container->get_current_tab();
@@ -2878,6 +2910,8 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_res_saved_callback", &ScriptEditor::_res_saved_callback);
ClassDB::bind_method("_goto_script_line", &ScriptEditor::_goto_script_line);
ClassDB::bind_method("_goto_script_line2", &ScriptEditor::_goto_script_line2);
+ ClassDB::bind_method("_set_execution", &ScriptEditor::_set_execution);
+ ClassDB::bind_method("_clear_execution", &ScriptEditor::_clear_execution);
ClassDB::bind_method("_help_search", &ScriptEditor::_help_search);
ClassDB::bind_method("_save_history", &ScriptEditor::_save_history);
ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path);
@@ -3168,6 +3202,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debugger = memnew(ScriptEditorDebugger(editor));
debugger->connect("goto_script_line", this, "_goto_script_line");
+ debugger->connect("set_execution", this, "_set_execution");
+ debugger->connect("clear_execution", this, "_clear_execution");
debugger->connect("show_debugger", this, "_show_debugger");
disk_changed = memnew(ConfirmationDialog);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index f13308dec7..a17fed1e06 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -96,6 +96,8 @@ public:
virtual Variant get_edit_state() = 0;
virtual void set_edit_state(const Variant &p_state) = 0;
virtual void goto_line(int p_line, bool p_with_error = false) = 0;
+ virtual void set_executing_line(int p_line) = 0;
+ virtual void clear_executing_line() = 0;
virtual void trim_trailing_whitespace() = 0;
virtual void convert_indent_to_spaces() = 0;
virtual void convert_indent_to_tabs() = 0;
@@ -318,6 +320,8 @@ class ScriptEditor : public PanelContainer {
void _goto_script_line2(int p_line);
void _goto_script_line(REF p_script, int p_line);
+ void _set_execution(REF p_script, int p_line);
+ void _clear_execution(REF p_script);
void _breaked(bool p_breaked, bool p_can_debug);
void _show_debugger(bool p_show);
void _update_window_menu();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 46b2e8a5f8..d40e67cc8c 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -214,6 +214,7 @@ void ScriptTextEditor::_load_theme_settings() {
Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
Color mark_color = EDITOR_GET("text_editor/highlighting/mark_color");
Color breakpoint_color = EDITOR_GET("text_editor/highlighting/breakpoint_color");
+ Color executing_line_color = EDITOR_GET("text_editor/highlighting/executing_line_color");
Color code_folding_color = EDITOR_GET("text_editor/highlighting/code_folding_color");
Color search_result_color = EDITOR_GET("text_editor/highlighting/search_result_color");
Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
@@ -245,6 +246,7 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_color_override("function_color", function_color);
text_edit->add_color_override("member_variable_color", member_variable_color);
text_edit->add_color_override("breakpoint_color", breakpoint_color);
+ text_edit->add_color_override("executing_line_color", executing_line_color);
text_edit->add_color_override("mark_color", mark_color);
text_edit->add_color_override("code_folding_color", code_folding_color);
text_edit->add_color_override("search_result_color", search_result_color);
@@ -479,6 +481,14 @@ void ScriptTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
code_editor->goto_line_selection(p_line, p_begin, p_end);
}
+void ScriptTextEditor::set_executing_line(int p_line) {
+ code_editor->set_executing_line(p_line);
+}
+
+void ScriptTextEditor::clear_executing_line() {
+ code_editor->clear_executing_line();
+}
+
void ScriptTextEditor::ensure_focus() {
code_editor->get_text_edit()->grab_focus();
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 4edb1c3c67..0dbc884594 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -196,6 +196,8 @@ public:
virtual void goto_line(int p_line, bool p_with_error = false);
void goto_line_selection(int p_line, int p_begin, int p_end);
+ virtual void set_executing_line(int p_line);
+ virtual void clear_executing_line();
virtual void reload(bool p_soft);
virtual void get_breakpoints(List<int> *p_breakpoints);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index d39e521113..31660a9e19 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -85,6 +85,7 @@ void ShaderTextEditor::_load_theme_settings() {
Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
Color mark_color = EDITOR_GET("text_editor/highlighting/mark_color");
Color breakpoint_color = EDITOR_GET("text_editor/highlighting/breakpoint_color");
+ Color executing_line_color = EDITOR_GET("text_editor/highlighting/executing_line_color");
Color code_folding_color = EDITOR_GET("text_editor/highlighting/code_folding_color");
Color search_result_color = EDITOR_GET("text_editor/highlighting/search_result_color");
Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
@@ -113,6 +114,7 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("member_variable_color", member_variable_color);
get_text_edit()->add_color_override("mark_color", mark_color);
get_text_edit()->add_color_override("breakpoint_color", breakpoint_color);
+ get_text_edit()->add_color_override("executing_line_color", executing_line_color);
get_text_edit()->add_color_override("code_folding_color", code_folding_color);
get_text_edit()->add_color_override("search_result_color", search_result_color);
get_text_edit()->add_color_override("search_result_border_color", search_result_border_color);
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 2886b3dc51..becaae3567 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -94,6 +94,7 @@ void TextEditor::_load_theme_settings() {
Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
Color mark_color = EDITOR_GET("text_editor/highlighting/mark_color");
Color breakpoint_color = EDITOR_GET("text_editor/highlighting/breakpoint_color");
+ Color executing_line_color = EDITOR_GET("text_editor/highlighting/executing_line_color");
Color code_folding_color = EDITOR_GET("text_editor/highlighting/code_folding_color");
Color search_result_color = EDITOR_GET("text_editor/highlighting/search_result_color");
Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
@@ -124,6 +125,7 @@ void TextEditor::_load_theme_settings() {
text_edit->add_color_override("function_color", function_color);
text_edit->add_color_override("member_variable_color", member_variable_color);
text_edit->add_color_override("breakpoint_color", breakpoint_color);
+ text_edit->add_color_override("executing_line_color", executing_line_color);
text_edit->add_color_override("mark_color", mark_color);
text_edit->add_color_override("code_folding_color", code_folding_color);
text_edit->add_color_override("search_result_color", search_result_color);
@@ -268,6 +270,15 @@ void TextEditor::goto_line(int p_line, bool p_with_error) {
code_editor->goto_line(p_line);
}
+void TextEditor::set_executing_line(int p_line) {
+
+ code_editor->set_executing_line(p_line);
+}
+
+void TextEditor::clear_executing_line() {
+ code_editor->clear_executing_line();
+}
+
void TextEditor::ensure_focus() {
code_editor->get_text_edit()->grab_focus();
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index 3c136277df..767001e2f6 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -123,6 +123,8 @@ public:
virtual Vector<String> get_functions();
virtual void get_breakpoints(List<int> *p_breakpoints);
virtual void goto_line(int p_line, bool p_with_error = false);
+ virtual void set_executing_line(int p_line);
+ virtual void clear_executing_line();
virtual void trim_trailing_whitespace();
virtual void convert_indent_to_spaces();
virtual void convert_indent_to_tabs();
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 82117b9505..1da8bf874c 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -209,6 +209,7 @@ void ScriptEditorDebugger::debug_next() {
Array msg;
msg.push_back("next");
ppeer->put_var(msg);
+ _clear_execution();
stack_dump->clear();
}
void ScriptEditorDebugger::debug_step() {
@@ -220,6 +221,7 @@ void ScriptEditorDebugger::debug_step() {
Array msg;
msg.push_back("step");
ppeer->put_var(msg);
+ _clear_execution();
stack_dump->clear();
}
@@ -243,6 +245,7 @@ void ScriptEditorDebugger::debug_continue() {
OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id());
Array msg;
+ _clear_execution();
msg.push_back("continue");
ppeer->put_var(msg);
}
@@ -422,6 +425,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
} else if (p_msg == "debug_exit") {
breaked = false;
+ _clear_execution();
copy->set_disabled(true);
step->set_disabled(true);
next->set_disabled(true);
@@ -1270,6 +1274,18 @@ void ScriptEditorDebugger::_notification(int p_what) {
}
}
+void ScriptEditorDebugger::_clear_execution() {
+ TreeItem *ti = stack_dump->get_selected();
+ if (!ti)
+ return;
+
+ Dictionary d = ti->get_metadata(0);
+
+ stack_script = ResourceLoader::load(d["file"]);
+ emit_signal("clear_execution", stack_script);
+ stack_script.unref();
+}
+
void ScriptEditorDebugger::start() {
stop();
@@ -1310,6 +1326,7 @@ void ScriptEditorDebugger::stop() {
set_process(false);
breaked = false;
+ _clear_execution();
server->stop();
_clear_remote_objects();
@@ -1390,6 +1407,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
stack_script = ResourceLoader::load(d["file"]);
emit_signal("goto_script_line", stack_script, int(d["line"]) - 1);
+ emit_signal("set_execution", stack_script, int(d["line"]) - 1);
stack_script.unref();
if (connection.is_valid() && connection->is_connected_to_host()) {
@@ -1963,6 +1981,8 @@ void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_scene_tree_property_value_edited"), &ScriptEditorDebugger::_scene_tree_property_value_edited);
ADD_SIGNAL(MethodInfo("goto_script_line"));
+ ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
+ ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script")));
ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug")));
ADD_SIGNAL(MethodInfo("show_debugger", PropertyInfo(Variant::BOOL, "reallydid")));
}
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index 5f21602579..f7afe6bf72 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -205,6 +205,8 @@ class ScriptEditorDebugger : public Control {
void _export_csv();
+ void _clear_execution();
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index efd471eed1..b50c99932d 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -2101,6 +2101,14 @@ void VisualScriptEditor::goto_line(int p_line, bool p_with_error) {
}
}
+void VisualScriptEditor::set_executing_line(int p_line) {
+ // todo: add a way to show which node is executing right now.
+}
+
+void VisualScriptEditor::clear_executing_line() {
+ // todo: add a way to show which node is executing right now.
+}
+
void VisualScriptEditor::trim_trailing_whitespace() {
}
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index f4b4a6981d..9387a09c78 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -263,6 +263,8 @@ public:
virtual Variant get_edit_state();
virtual void set_edit_state(const Variant &p_state);
virtual void goto_line(int p_line, bool p_with_error = false);
+ virtual void set_executing_line(int p_line);
+ virtual void clear_executing_line();
virtual void trim_trailing_whitespace();
virtual void convert_indent_to_spaces();
virtual void convert_indent_to_tabs();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 9c6fa703fa..c77705f35f 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -988,6 +988,24 @@ void TextEdit::_notification(int p_what) {
draw_texture_rect(info_icon, Rect2(icon_pos, icon_size));
}
+ // draw execution marker
+ if (executing_line == line) {
+ if (draw_breakpoint_gutter) {
+ int icon_extra_size = 4;
+ int vertical_gap = (get_row_height() * 40) / 100;
+ int horizontal_gap = (cache.breakpoint_gutter_width * 30) / 100;
+ int marker_height = get_row_height() - (vertical_gap * 2) + icon_extra_size;
+ int marker_width = cache.breakpoint_gutter_width - (horizontal_gap * 2) + icon_extra_size;
+ cache.executing_icon->draw_rect(ci, Rect2(cache.style_normal->get_margin(MARGIN_LEFT) + horizontal_gap - 2 - icon_extra_size / 2, ofs_y + vertical_gap - icon_extra_size / 2, marker_width, marker_height), false, Color(cache.executing_line_color.r, cache.executing_line_color.g, cache.executing_line_color.b));
+ } else {
+#ifdef TOOLS_ENABLED
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y + get_row_height() - EDSCALE, xmargin_end - xmargin_beg, EDSCALE), cache.executing_line_color);
+#else
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.executing_line_color);
+#endif
+ }
+ }
+
// draw fold markers
if (draw_fold_gutter) {
int horizontal_gap = (cache.fold_gutter_width * 30) / 100;
@@ -4414,6 +4432,7 @@ void TextEdit::_update_caches() {
cache.current_line_color = get_color("current_line_color");
cache.line_length_guideline_color = get_color("line_length_guideline_color");
cache.breakpoint_color = get_color("breakpoint_color");
+ cache.executing_line_color = get_color("executing_line_color");
cache.code_folding_color = get_color("code_folding_color");
cache.brace_mismatch_color = get_color("brace_mismatch_color");
cache.word_highlighted_color = get_color("word_highlighted_color");
@@ -4431,6 +4450,7 @@ void TextEdit::_update_caches() {
cache.folded_icon = get_icon("folded");
cache.can_fold_icon = get_icon("fold");
cache.folded_eol_icon = get_icon("GuiEllipsis", "EditorIcons");
+ cache.executing_icon = get_icon("MainPlay", "EditorIcons");
text.set_font(cache.font);
if (syntax_highlighter) {
@@ -4996,6 +5016,17 @@ bool TextEdit::is_line_set_as_safe(int p_line) const {
return text.is_safe(p_line);
}
+void TextEdit::set_executing_line(int p_line) {
+ ERR_FAIL_INDEX(p_line, text.size());
+ executing_line = p_line;
+ update();
+}
+
+void TextEdit::clear_executing_line() {
+ executing_line = -1;
+ update();
+}
+
bool TextEdit::is_line_set_as_breakpoint(int p_line) const {
ERR_FAIL_INDEX_V(p_line, text.size(), false);
@@ -6481,6 +6512,8 @@ TextEdit::TextEdit() {
menu->add_item(RTR("Redo"), MENU_REDO, KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z);
menu->connect("id_pressed", this, "menu_option");
first_draw = true;
+
+ executing_line = -1;
}
TextEdit::~TextEdit() {
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index e854032159..4badd85e07 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -166,6 +166,7 @@ private:
Ref<Texture> can_fold_icon;
Ref<Texture> folded_icon;
Ref<Texture> folded_eol_icon;
+ Ref<Texture> executing_icon;
Ref<StyleBox> style_normal;
Ref<StyleBox> style_focus;
Ref<StyleBox> style_readonly;
@@ -187,6 +188,7 @@ private:
Color selection_color;
Color mark_color;
Color breakpoint_color;
+ Color executing_line_color;
Color code_folding_color;
Color current_line_color;
Color line_length_guideline_color;
@@ -345,6 +347,8 @@ private:
bool context_menu_enabled;
+ int executing_line;
+
int get_visible_rows() const;
int get_total_visible_rows() const;
@@ -486,6 +490,8 @@ public:
void set_line_as_marked(int p_line, bool p_marked);
void set_line_as_breakpoint(int p_line, bool p_breakpoint);
bool is_line_set_as_breakpoint(int p_line) const;
+ void set_executing_line(int p_line);
+ void clear_executing_line();
void set_line_as_safe(int p_line, bool p_safe);
bool is_line_set_as_safe(int p_line) const;
void get_breakpoints(List<int> *p_breakpoints) const;
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 5ae57fdb52..79d93113b3 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -439,6 +439,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("selection_color", "TextEdit", font_color_selection);
theme->set_color("mark_color", "TextEdit", Color(1.0, 0.4, 0.4, 0.4));
theme->set_color("breakpoint_color", "TextEdit", Color(0.8, 0.8, 0.4, 0.2));
+ theme->set_color("executing_line_color", "TextEdit", Color(0.2, 0.8, 0.2, 0.4));
theme->set_color("code_folding_color", "TextEdit", Color(0.8, 0.8, 0.8, 0.8));
theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8));
theme->set_color("caret_color", "TextEdit", control_font_color);