Skip to content

Commit

Permalink
Change the shader uniform tooltips of '/**' to '/** '.
Browse files Browse the repository at this point in the history
  • Loading branch information
magian1127 committed May 4, 2024
1 parent f91db3d commit 2f8c5e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editor/plugins/text_shader_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void ShaderTextEditor::_load_theme_settings() {
syntax_highlighter->add_color_region("//", "", comment_color, true);

const Color doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color");
syntax_highlighter->add_color_region("/**", "*/", doc_comment_color, false);
syntax_highlighter->add_color_region("/** ", "*/", doc_comment_color, false);

// Disabled preprocessor branches use translucent text color to be easier to distinguish from comments.
syntax_highlighter->set_disabled_branch_color(Color(EDITOR_GET("text_editor/theme/highlighting/text_color")) * Color(1, 1, 1, 0.5));
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void Shader::get_shader_uniform_list(List<PropertyInfo> *p_params, bool p_get_gr
DocData::PropertyDoc prop_doc;
prop_doc.name = "shader_parameter/" + pi.name;
#ifdef MODULE_REGEX_ENABLED
const RegEx pattern("/\\*\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+/\\s*uniform\\s+\\w+\\s+" + pi.name + "(?=[\\s:;=])");
const RegEx pattern("/\\*\\*\\s([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+/\\s*uniform\\s+\\w+\\s+" + pi.name + "(?=[\\s:;=])");
Ref<RegExMatch> pattern_ref = pattern.search(code);
if (pattern_ref != nullptr) {
RegExMatch *match = pattern_ref.ptr();
Expand Down

0 comments on commit 2f8c5e1

Please sign in to comment.