Added a marker in text_edit that tells which row is executing.

This commit is contained in:
Rikhardur Bjarni Einarsson 2019-04-22 17:20:27 +01:00
parent 886afa9b76
commit 9bfa63496a
18 changed files with 152 additions and 0 deletions

View file

@ -216,6 +216,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");
@ -247,6 +248,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);
@ -481,6 +483,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();