diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-18 19:41:10 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-18 20:11:11 +0200 |
| commit | 2adef1e52fc323b00a02cd08154c83ebfffa3562 (patch) | |
| tree | d09c5b9245a280895ad523a9ca324dce4212a8a6 /modules/mono/editor/bindings_generator.h | |
| parent | b550f93cfd7862fdf9bf4fc838f2ad04ef89a131 (diff) | |
| download | redot-engine-2adef1e52fc323b00a02cd08154c83ebfffa3562.tar.gz | |
Fix prefix erasing for the generated C# enum constants
Diffstat (limited to 'modules/mono/editor/bindings_generator.h')
| -rw-r--r-- | modules/mono/editor/bindings_generator.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h index 7ae52e180f..38cf99c294 100644 --- a/modules/mono/editor/bindings_generator.h +++ b/modules/mono/editor/bindings_generator.h @@ -43,20 +43,21 @@ class BindingsGenerator { struct ConstantInterface { String name; + String proxy_name; int value; const DocData::ConstantDoc *const_doc; ConstantInterface() {} - ConstantInterface(const String &p_name, int p_value) { + ConstantInterface(const String &p_name, const String &p_proxy_name, int p_value) { name = p_name; + proxy_name = p_proxy_name; value = p_value; } }; struct EnumInterface { StringName cname; - String prefix; List<ConstantInterface> constants; _FORCE_INLINE_ bool operator==(const EnumInterface &p_ienum) const { @@ -520,7 +521,8 @@ class BindingsGenerator { return p_type.name; } - String _determine_enum_prefix(const EnumInterface &p_ienum); + int _determine_enum_prefix(const EnumInterface &p_ienum); + void _apply_prefix_to_enum_constants(EnumInterface &p_ienum, int p_prefix_length); void _generate_method_icalls(const TypeInterface &p_itype); |
