diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-06-01 17:58:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 17:58:19 +0200 |
commit | c5f237eaf8e46e55699a3e95956daec65f5aa963 (patch) | |
tree | e67be6f66a353c96f4c7528c0ca7fe30d3266b1e /editor/plugins/visual_shader_editor_plugin.cpp | |
parent | 0aabfb341a477280befe115926486f2a32f34f0e (diff) | |
parent | 168427624ebcac64e34282eddc7856fa5de45ce6 (diff) |
Merge pull request #45393 from Paulb23/code_edit_autocomplete
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index a0757439c3..98e1a1489e 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -848,6 +848,10 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { expression_syntax_highlighter->add_color_region("/*", "*/", comment_color, false); expression_syntax_highlighter->add_color_region("//", "", comment_color, true); + expression_box->clear_comment_delimiters(); + expression_box->add_comment_delimiter("/*", "*/", false); + expression_box->add_comment_delimiter("//", "", true); + expression_box->set_text(expression); expression_box->set_context_menu_enabled(false); expression_box->set_draw_line_numbers(true); @@ -2984,6 +2988,10 @@ void VisualShaderEditor::_notification(int p_what) { syntax_highlighter->add_color_region("/*", "*/", comment_color, false); syntax_highlighter->add_color_region("//", "", comment_color, true); + preview_text->clear_comment_delimiters(); + preview_text->add_comment_delimiter("/*", "*/", false); + preview_text->add_comment_delimiter("//", "", true); + error_text->add_theme_font_override("font", get_theme_font("status_source", "EditorFonts")); error_text->add_theme_font_size_override("font_size", get_theme_font_size("status_source_size", "EditorFonts")); error_text->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); |