Merge pull request #90368 from Naros/expose-classdb-is-enum-bitfield
Expose `ClassDB::is_enum_bitfield` as `ClassDB::is_class_enum_bitfield`
This commit is contained in:
commit
0b89b8b64c
|
@ -1531,6 +1531,10 @@ StringName ClassDB::class_get_integer_constant_enum(const StringName &p_class, c
|
|||
return ::ClassDB::get_integer_constant_enum(p_class, p_name, p_no_inheritance);
|
||||
}
|
||||
|
||||
bool ClassDB::is_class_enum_bitfield(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance) const {
|
||||
return ::ClassDB::is_enum_bitfield(p_class, p_enum, p_no_inheritance);
|
||||
}
|
||||
|
||||
bool ClassDB::is_class_enabled(const StringName &p_class) const {
|
||||
return ::ClassDB::is_class_enabled(p_class);
|
||||
}
|
||||
|
@ -1547,7 +1551,7 @@ void ClassDB::get_argument_options(const StringName &p_function, int p_idx, List
|
|||
pf == "class_has_method" || pf == "class_get_method_list" ||
|
||||
pf == "class_get_integer_constant_list" || pf == "class_has_integer_constant" || pf == "class_get_integer_constant" ||
|
||||
pf == "class_has_enum" || pf == "class_get_enum_list" || pf == "class_get_enum_constants" || pf == "class_get_integer_constant_enum" ||
|
||||
pf == "is_class_enabled");
|
||||
pf == "is_class_enabled" || pf == "is_class_enum_bitfield");
|
||||
}
|
||||
if (first_argument_is_class || pf == "is_parent_class") {
|
||||
for (const String &E : get_class_list()) {
|
||||
|
@ -1592,6 +1596,8 @@ void ClassDB::_bind_methods() {
|
|||
::ClassDB::bind_method(D_METHOD("class_get_enum_constants", "class", "enum", "no_inheritance"), &ClassDB::class_get_enum_constants, DEFVAL(false));
|
||||
::ClassDB::bind_method(D_METHOD("class_get_integer_constant_enum", "class", "name", "no_inheritance"), &ClassDB::class_get_integer_constant_enum, DEFVAL(false));
|
||||
|
||||
::ClassDB::bind_method(D_METHOD("is_class_enum_bitfield", "class", "enum", "no_inheritance"), &ClassDB::is_class_enum_bitfield, DEFVAL(false));
|
||||
|
||||
::ClassDB::bind_method(D_METHOD("is_class_enabled", "class"), &ClassDB::is_class_enabled);
|
||||
}
|
||||
|
||||
|
|
|
@ -462,6 +462,8 @@ public:
|
|||
PackedStringArray class_get_enum_constants(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance = false) const;
|
||||
StringName class_get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false) const;
|
||||
|
||||
bool is_class_enum_bitfield(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance = false) const;
|
||||
|
||||
bool is_class_enabled(const StringName &p_class) const;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
|
|
@ -192,6 +192,15 @@
|
|||
Returns whether this [param class] is enabled or not.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_class_enum_bitfield" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="class" type="StringName" />
|
||||
<param index="1" name="enum" type="StringName" />
|
||||
<param index="2" name="no_inheritance" type="bool" default="false" />
|
||||
<description>
|
||||
Returns whether [param class] (or its ancestor classes if [param no_inheritance] is [code]false[/code]) has an enum called [param enum] that is a bitfield.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_parent_class" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="class" type="StringName" />
|
||||
|
|
Loading…
Reference in New Issue