Merge pull request #1027 from Daylily-Zeleen/daylily-zeleen/fix_global_enum_cast
Fix global enum cast and add `Varint::Type`'s cast.pull/975/head
commit
0704528b4c
|
@ -1621,8 +1621,14 @@ def generate_global_constant_binds(api, output_dir):
|
||||||
if enum_def["name"].startswith("Variant."):
|
if enum_def["name"].startswith("Variant."):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if enum_def["is_bitfield"]:
|
||||||
|
header.append(f'VARIANT_BITFIELD_CAST(godot::{enum_def["name"]});')
|
||||||
|
else:
|
||||||
header.append(f'VARIANT_ENUM_CAST(godot::{enum_def["name"]});')
|
header.append(f'VARIANT_ENUM_CAST(godot::{enum_def["name"]});')
|
||||||
|
|
||||||
|
# Variant::Type is not a global enum, but only one line, it is worth to place in this file instead of creating new file.
|
||||||
|
header.append(f"VARIANT_ENUM_CAST(godot::Variant::Type);")
|
||||||
|
|
||||||
header.append("")
|
header.append("")
|
||||||
|
|
||||||
header.append(f"#endif // ! {header_guard}")
|
header.append(f"#endif // ! {header_guard}")
|
||||||
|
|
Loading…
Reference in New Issue