-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix uint's suffix is not highlighted in text shader editor #85014
Fix uint's suffix is not highlighted in text shader editor #85014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added several suggestions, also set_uint_suffix_enabled
might be an open method, but this can be fixed in another PR.
e9b2810
to
b851514
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
@@ -139,6 +141,8 @@ class CodeHighlighter : public SyntaxHighlighter { | |||
|
|||
void set_member_variable_color(Color p_color); | |||
Color get_member_variable_color() const; | |||
|
|||
void set_uint_suffix_enabled(bool p_enabled = true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious as to why this setter has a default parameter. We generally don't use default parameters for setter methods by convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just followed @Chaosus 's suggestion for this, in this case looks like explicit is better
Fixes #75161
GDShaderSyntaxHighlighter
usesCodeHighlighter
which doesn't recognize this suffix syntax, there are other ways to fix this, IMHO add a bool in the base class to distinguish the behaviour is the one introduces least change.