mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Expose enum related methods in ClassDB
This commit is contained in:
@@ -790,6 +790,24 @@ void ClassDB::get_enum_constants(const StringName &p_class, const StringName &p_
|
||||
}
|
||||
}
|
||||
|
||||
bool ClassDB::has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) {
|
||||
OBJTYPE_RLOCK;
|
||||
|
||||
ClassInfo *type = classes.getptr(p_class);
|
||||
|
||||
while (type) {
|
||||
if (type->enum_map.has(p_name)) {
|
||||
return true;
|
||||
}
|
||||
if (p_no_inheritance) {
|
||||
return false;
|
||||
}
|
||||
type = type->inherits_ptr;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClassDB::add_signal(StringName p_class, const MethodInfo &p_signal) {
|
||||
OBJTYPE_WLOCK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user