From 1353ed5e44a725308292ce44d24d7cf76b0af272 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 25 Jul 2020 18:27:35 +0100 Subject: Added Line numbers to CodeEdit --- editor/plugins/shader_editor_plugin.cpp | 2 +- editor/plugins/visual_shader_editor_plugin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 80e064ce4e..bbffd2fdcf 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -365,7 +365,7 @@ void ShaderEditor::_editor_settings_changed() { shader_editor->get_text_editor()->set_auto_indent(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent")); shader_editor->get_text_editor()->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs")); shader_editor->get_text_editor()->set_draw_spaces(EditorSettings::get_singleton()->get("text_editor/indent/draw_spaces")); - shader_editor->get_text_editor()->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_numbers")); + shader_editor->get_text_editor()->set_draw_line_numbers(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_numbers")); shader_editor->get_text_editor()->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences")); shader_editor->get_text_editor()->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_current_line")); shader_editor->get_text_editor()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink")); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 0da86ed3a1..adca639896 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -968,7 +968,7 @@ void VisualShaderEditor::_update_graph() { expression_box->set_text(expression); expression_box->set_context_menu_enabled(false); - expression_box->set_show_line_numbers(true); + expression_box->set_draw_line_numbers(true); expression_box->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_expression_focus_out), varray(expression_box, nodes[n_i])); } @@ -2557,7 +2557,7 @@ VisualShaderEditor::VisualShaderEditor() { preview_text->set_v_size_flags(SIZE_EXPAND_FILL); preview_text->set_custom_minimum_size(Size2(400 * EDSCALE, 0)); preview_text->set_syntax_highlighter(syntax_highlighter); - preview_text->set_show_line_numbers(true); + preview_text->set_draw_line_numbers(true); preview_text->set_readonly(true); error_text = memnew(Label); -- cgit v1.2.3