diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-06 09:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 09:35:40 +0200 |
commit | cf194847468e00de682074a14b2cf4ccf7b69188 (patch) | |
tree | 4ebf367bf5fe4db50db3342707cfae7c2c5e91d6 /modules/gdscript | |
parent | 398ab31a6bcf1a80a6fc13a56e2f7f8558303d51 (diff) | |
parent | 5ac42cf5766cd60a9c41bdd6045c8ccfd35d62c1 (diff) |
Merge pull request #62374 from reduz/implement-bitfield-hint
Implement a BitField hint
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 474c8094f2..e419493324 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -569,7 +569,7 @@ static int _get_enum_constant_location(StringName p_class, StringName p_enum_con // END LOCATION METHODS static String _get_visual_datatype(const PropertyInfo &p_info, bool p_is_arg = true) { - if (p_info.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + if (p_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD)) { String enum_name = p_info.class_name; if (!enum_name.contains(".")) { return enum_name; @@ -1292,7 +1292,7 @@ static GDScriptCompletionIdentifier _type_from_property(const PropertyInfo &p_pr return ci; } - if (p_property.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + if (p_property.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD)) { ci.enumeration = p_property.class_name; } @@ -2407,7 +2407,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c if (p_argidx < method_args) { PropertyInfo arg_info = info.arguments[p_argidx]; - if (arg_info.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + if (arg_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD)) { _find_enumeration_candidates(p_context, arg_info.class_name, r_result); } } |